├── .azure
└── pipelines
│ ├── CodeCoverage.runsettings
│ ├── azure-pipelines-compliance-policheck.yml
│ ├── azure-pipelines-compliance.yml
│ ├── azure-pipelines-external-release.yml
│ ├── azure-pipelines-internal-release.yml
│ ├── azure-pipelines-mirror.yml
│ ├── azure-pipelines-performance.yml
│ ├── azure-pipelines-tsavorite-codecoverage.yml
│ ├── azure-pipelines-tsavorite.yml
│ ├── azure-pipelines.yml
│ ├── createbinaries.ps1
│ ├── credscan-exclusion.json
│ ├── extract_version.ps1
│ └── policheck-exclusion.xml
├── .dockerignore
├── .editorconfig
├── .gitattributes
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ └── feature_request.yml
└── workflows
│ ├── ci-bdnbenchmark.yml
│ ├── ci.yml
│ ├── codeql.yml
│ ├── deploy-website.yml
│ ├── docker-linux.yml
│ ├── docker-windows.yml
│ ├── helm-chart.yml
│ ├── locker.yml
│ └── nightly.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── Directory.Build.props
├── Directory.Packages.props
├── Dockerfile
├── Dockerfile.alpine
├── Dockerfile.cbl-mariner
├── Dockerfile.chiseled
├── Dockerfile.nanoserver
├── Dockerfile.ubuntu
├── Garnet.sln
├── Garnet.snk
├── LICENSE
├── NOTICE.md
├── README.md
├── SECURITY.md
├── SUPPORT.md
├── Version.props
├── benchmark
├── BDN.benchmark
│ ├── BDN.benchmark.csproj
│ ├── Cluster
│ │ ├── ClusterContext.cs
│ │ ├── ClusterMigrate.cs
│ │ ├── ClusterOperations.cs
│ │ ├── ClusterParams.cs
│ │ └── Request.cs
│ ├── Custom
│ │ ├── CustomProcSet.cs
│ │ └── CustomTxnSet.cs
│ ├── Embedded
│ │ ├── EmbeddedNetworkHandler.cs
│ │ ├── EmbeddedNetworkSender.cs
│ │ ├── EmbeddedRespServer.cs
│ │ ├── GarnetServerEmbedded.cs
│ │ └── Request.cs
│ ├── Geo
│ │ └── GeoHash.cs
│ ├── Json
│ │ └── JsonPathQuery.cs
│ ├── Lua
│ │ ├── LuaParams.cs
│ │ ├── LuaRunnerOperations.cs
│ │ ├── LuaScriptCacheOperations.cs
│ │ ├── LuaScripts.cs
│ │ └── LuaTimeouts.cs
│ ├── Network
│ │ ├── BasicOperations.cs
│ │ ├── NetworkBase.cs
│ │ ├── NetworkParams.cs
│ │ └── RawStringOperations.cs
│ ├── Operations
│ │ ├── BasicOperations.cs
│ │ ├── CustomOperations.cs
│ │ ├── HashObjectOperations.cs
│ │ ├── JsonOperations.cs
│ │ ├── ModuleOperations.cs
│ │ ├── ObjectOperations.cs
│ │ ├── OperationParams.cs
│ │ ├── OperationsBase.cs
│ │ ├── PubSubOperations.cs
│ │ ├── RawStringOperations.cs
│ │ ├── ScriptOperations.cs
│ │ ├── SetOperations.cs
│ │ └── SortedSetOperations.cs
│ ├── Parsing
│ │ ├── DoubleToResp.cs
│ │ ├── IntegerToResp.cs
│ │ └── RespToInteger.cs
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Utils
│ │ └── BenchUtils.cs
├── README.md
└── Resp.benchmark
│ ├── BenchUtils.cs
│ ├── BenchmarkLoggerProvider.cs
│ ├── ClientTypes.cs
│ ├── GeoUtils.cs
│ ├── HashUtils.cs
│ ├── NumUtils.cs
│ ├── OnlineReqGen.cs
│ ├── OpType.cs
│ ├── Options.cs
│ ├── PeriodicCheckpointer.cs
│ ├── Program.cs
│ ├── RandomGenerator.cs
│ ├── ReqGen.cs
│ ├── ReqGenLoadBuffers.cs
│ ├── ReqGenUtils.cs
│ ├── Resp.benchmark.csproj
│ ├── RespOnlineBench.cs
│ ├── RespPerfBench.cs
│ ├── TxnPerfBench.cs
│ └── ZipfGenerator.cs
├── charts
└── garnet
│ ├── .gitignore
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── README.md.gotmpl
│ ├── templates
│ ├── _helpers.tpl
│ ├── secret.yaml
│ ├── service-headless.yaml
│ ├── service.yaml
│ ├── serviceaccount.yaml
│ ├── statefulset.yaml
│ └── token.yaml
│ └── values.yaml
├── docker-compose.yml
├── hosting
└── Windows
│ └── Garnet.worker
│ ├── Garnet.worker.csproj
│ ├── Program.cs
│ └── Worker.cs
├── libs
├── client
│ ├── ClientSession
│ │ ├── AsyncGarnetClientSession.cs
│ │ ├── AsyncPool.cs
│ │ ├── GarnetClientSession.cs
│ │ ├── GarnetClientSessionClusterExtensions.cs
│ │ ├── GarnetClientSessionIncremental.cs
│ │ ├── GarnetClientSessionMigrationExtensions.cs
│ │ ├── GarnetClientSessionReplicationExtensions.cs
│ │ └── GarnetClientSessionTcpNetworkHandler.cs
│ ├── ClientTcpNetworkSender.cs
│ ├── CompletionEvent.cs
│ ├── ExceptionTypes.cs
│ ├── Garnet.client.csproj
│ ├── GarnetClient.cs
│ ├── GarnetClientAPI
│ │ ├── GarnetClientAdminCommands.cs
│ │ ├── GarnetClientBasicRespCommands.cs
│ │ ├── GarnetClientClusterCommands.cs
│ │ ├── GarnetClientExecuteAPI.cs
│ │ ├── GarnetClientListCommands.cs
│ │ ├── GarnetClientSortedSetCommands.cs
│ │ └── SortedSetPairCollection.cs
│ ├── GarnetClientMetrics.cs
│ ├── GarnetClientProcessReplies.cs
│ ├── GarnetClientTcpNetworkHandler.cs
│ ├── LightEpoch.cs
│ ├── NetworkWriter.cs
│ ├── PageAsyncResultTypes.cs
│ ├── PageOffset.cs
│ ├── RespReadResponseUtils.cs
│ ├── TcsWrapper.cs
│ └── Utility.cs
├── cluster
│ ├── AssemblyInfo.cs
│ ├── ClusterFactory.cs
│ ├── CmdStrings.cs
│ ├── Garnet.cluster.csproj
│ ├── Server
│ │ ├── ClusterAuthContainer.cs
│ │ ├── ClusterConfig.cs
│ │ ├── ClusterConfigSerializer.cs
│ │ ├── ClusterManager.cs
│ │ ├── ClusterManagerSlotState.cs
│ │ ├── ClusterManagerWorkerState.cs
│ │ ├── ClusterProvider.cs
│ │ ├── ClusterUtils.cs
│ │ ├── ConnectionInfo.cs
│ │ ├── Failover
│ │ │ ├── FailoverManager.cs
│ │ │ ├── FailoverSession.cs
│ │ │ ├── FailoverStatus.cs
│ │ │ ├── PrimaryFailoverSession.cs
│ │ │ └── ReplicaFailoverSession.cs
│ │ ├── GarnetClientExtensions.cs
│ │ ├── GarnetClusterConnectionStore.cs
│ │ ├── GarnetServerNode.cs
│ │ ├── Gossip.cs
│ │ ├── GossipStats.cs
│ │ ├── HashSlot.cs
│ │ ├── Migration
│ │ │ ├── KeyMigrateState.cs
│ │ │ ├── MigrateSession.cs
│ │ │ ├── MigrateSessionKeyManager.cs
│ │ │ ├── MigrateSessionKeys.cs
│ │ │ ├── MigrateSessionSend.cs
│ │ │ ├── MigrateSessionSlots.cs
│ │ │ ├── MigrateSessionTaskStore.cs
│ │ │ ├── MigrateState.cs
│ │ │ ├── MigratingKeysWorkingSet.cs
│ │ │ ├── MigrationDriver.cs
│ │ │ ├── MigrationKeyIterationFunctions.cs
│ │ │ └── MigrationManager.cs
│ │ ├── Replication
│ │ │ ├── CheckpointEntry.cs
│ │ │ ├── CheckpointFileType.cs
│ │ │ ├── CheckpointStore.cs
│ │ │ ├── PrimaryOps
│ │ │ │ ├── AofSyncTaskInfo.cs
│ │ │ │ ├── AofTaskStore.cs
│ │ │ │ ├── DisklessReplication
│ │ │ │ │ ├── ReplicaSyncSession.cs
│ │ │ │ │ ├── ReplicationSnapshotIterator.cs
│ │ │ │ │ ├── ReplicationSyncManager.cs
│ │ │ │ │ └── SyncStatus.cs
│ │ │ │ ├── PrimarySync.cs
│ │ │ │ ├── ReplicaSyncSession.cs
│ │ │ │ ├── ReplicaSyncSessionTaskStore.cs
│ │ │ │ └── ReplicationPrimaryAofSync.cs
│ │ │ ├── RecoveryStatus.cs
│ │ │ ├── ReplicaOps
│ │ │ │ ├── ReceiveCheckpointHandler.cs
│ │ │ │ ├── ReplicaDisklessSync.cs
│ │ │ │ ├── ReplicaReceiveCheckpoint.cs
│ │ │ │ ├── ReplicaReplayTask.cs
│ │ │ │ └── ReplicationReplicaAofSync.cs
│ │ │ ├── ReplicationCheckpointManagement.cs
│ │ │ ├── ReplicationDevice.cs
│ │ │ ├── ReplicationHistoryManager.cs
│ │ │ ├── ReplicationLogCheckpointManager.cs
│ │ │ ├── ReplicationManager.cs
│ │ │ ├── ReplicationNetworkBufferSettings.cs
│ │ │ └── SyncMetadata.cs
│ │ └── Worker.cs
│ ├── Session
│ │ ├── ClusterCommandInfo.cs
│ │ ├── ClusterCommands.cs
│ │ ├── ClusterKeyIterationFunctions.cs
│ │ ├── ClusterSession.cs
│ │ ├── FailoverCommand.cs
│ │ ├── MigrateCommand.cs
│ │ ├── ReplicaOfCommand.cs
│ │ ├── RespClusterBasicCommands.cs
│ │ ├── RespClusterFailoverCommands.cs
│ │ ├── RespClusterMigrateCommands.cs
│ │ ├── RespClusterReplicationCommands.cs
│ │ ├── RespClusterSlotManagementCommands.cs
│ │ ├── SlotVerification
│ │ │ ├── ClusterSlotVerificationResult.cs
│ │ │ ├── ClusterSlotVerify.cs
│ │ │ ├── RespClusterIterativeSlotVerify.cs
│ │ │ └── RespClusterSlotVerify.cs
│ │ ├── SlotVerifiedState.cs
│ │ └── TransferOption.cs
│ └── SessionParseStateExtensions.cs
├── common
│ ├── AsciiUtils.cs
│ ├── ClientBase.cs
│ ├── Collections
│ │ ├── ElasticCircularBuffer.cs
│ │ └── ReadOptimizedConcurrentSet.cs
│ ├── ConvertUtils.cs
│ ├── Crc64.cs
│ ├── EnumUtils.cs
│ ├── ExceptionInjectionHelper.cs
│ ├── ExceptionInjectionType.cs
│ ├── FailoverOption.cs
│ ├── FileUtils.cs
│ ├── Format.cs
│ ├── Garnet.common.csproj
│ ├── GarnetException.cs
│ ├── Generator.cs
│ ├── HashSlotUtils.cs
│ ├── HashUtils.cs
│ ├── LightClient.cs
│ ├── LightClientRequest.cs
│ ├── LightClientTcpNetworkHandler.cs
│ ├── Logging
│ │ ├── FileLoggerProvider.cs
│ │ └── LogFormatter.cs
│ ├── Memory
│ │ ├── LimitedFixedBufferPool.cs
│ │ ├── PoolEntry.cs
│ │ └── PoolLevel.cs
│ ├── MemoryResult.cs
│ ├── Metrics
│ │ ├── InfoMetricsType.cs
│ │ ├── LatencyMetricsType.cs
│ │ └── MetricsItem.cs
│ ├── NetworkBufferSettings.cs
│ ├── Networking
│ │ ├── BatchHeader.cs
│ │ ├── BufferSizeUtils.cs
│ │ ├── GarnetSaeaBuffer.cs
│ │ ├── GarnetTcpNetworkSender.cs
│ │ ├── IMessageConsumer.cs
│ │ ├── INetworkHandler.cs
│ │ ├── INetworkSender.cs
│ │ ├── IServerHook.cs
│ │ ├── LightConcurrentStack.cs
│ │ ├── MaxSizeSettings.cs
│ │ ├── NetworkHandler.cs
│ │ ├── NetworkHandlerStream.cs
│ │ ├── NetworkSenderBase.cs
│ │ ├── TaskToApm.cs
│ │ ├── TcpNetworkHandler.cs
│ │ ├── TcpNetworkHandlerBase.cs
│ │ ├── TlsReaderStatus.cs
│ │ └── WireFormat.cs
│ ├── NumUtils.cs
│ ├── Parsing
│ │ └── RespParsingException.cs
│ ├── RandomUtils.cs
│ ├── RespLengthEncodingUtils.cs
│ ├── RespMemoryWriter.cs
│ ├── RespReadUtils.cs
│ ├── RespWriteUtils.cs
│ ├── SimpleObjectPool.cs
│ ├── SingleWriterMultiReaderLock.cs
│ └── StreamProvider.cs
├── host
│ ├── Configuration
│ │ ├── CommandLineTypes.cs
│ │ ├── ConfigProviders.cs
│ │ ├── GarnetCustomTransformers.cs
│ │ ├── Options.cs
│ │ ├── OptionsValidators.cs
│ │ ├── PopulateObjectJsonConverter.cs
│ │ ├── Redis
│ │ │ ├── RedisConfigSerializer.cs
│ │ │ ├── RedisOptions.cs
│ │ │ └── RedisTypes.cs
│ │ └── TypeConverters.cs
│ ├── Garnet.host.csproj
│ ├── GarnetServer.cs
│ ├── MemoryLogger.cs
│ ├── ServerSettingsManager.cs
│ └── defaults.conf
├── resources
│ ├── Garnet.resources.csproj
│ ├── ResourceUtils.cs
│ ├── RespCommandsDocs.json
│ └── RespCommandsInfo.json
├── server
│ ├── ACL
│ │ ├── ACLException.cs
│ │ ├── ACLParser.cs
│ │ ├── ACLPassword.cs
│ │ ├── AccessControlList.cs
│ │ ├── CommandPermissionSet.cs
│ │ ├── SecretsUtility.cs
│ │ ├── User.cs
│ │ └── UserHandle.cs
│ ├── AOF
│ │ ├── AofEntryType.cs
│ │ ├── AofHeader.cs
│ │ └── AofProcessor.cs
│ ├── API
│ │ ├── GarnetApi.cs
│ │ ├── GarnetApiObjectCommands.cs
│ │ ├── GarnetStatus.cs
│ │ ├── GarnetWatchApi.cs
│ │ ├── IGarnetAdvancedApi.cs
│ │ └── IGarnetApi.cs
│ ├── ArgSlice
│ │ ├── ArgSlice.cs
│ │ ├── ArgSliceComparer.cs
│ │ ├── ArgSliceUtils.cs
│ │ └── ScratchBufferManager.cs
│ ├── Auth
│ │ ├── Aad
│ │ │ └── IssuerSigningTokenProvider.cs
│ │ ├── GarnetACLAuthenticator.cs
│ │ ├── GarnetAadAuthenticator.cs
│ │ ├── GarnetAclWithAadAuthenticator.cs
│ │ ├── GarnetAclWithPasswordAuthenticator.cs
│ │ ├── GarnetNoAuthAuthenticator.cs
│ │ ├── GarnetPasswordAuthenticator.cs
│ │ ├── IGarnetAuthenticator.cs
│ │ └── Settings
│ │ │ ├── AadAuthenticationSettings.cs
│ │ │ ├── AclAuthenticationAadSettings.cs
│ │ │ ├── AclAuthenticationPasswordSettings.cs
│ │ │ ├── AclAuthenticationSettings.cs
│ │ │ ├── AuthenticationSettings.cs
│ │ │ ├── ConnectionProtectionOption.cs
│ │ │ ├── NoAuthSettings.cs
│ │ │ └── PasswordAuthenticationSettings.cs
│ ├── ByteArrayWrapper.cs
│ ├── ByteArrayWrapperComparer.cs
│ ├── ClientType.cs
│ ├── Cluster
│ │ ├── CheckpointMetadata.cs
│ │ ├── ClusterSlotVerificationInput.cs
│ │ ├── IClusterFactory.cs
│ │ ├── IClusterProvider.cs
│ │ ├── IClusterSession.cs
│ │ ├── RoleInfo.cs
│ │ └── StoreType.cs
│ ├── Custom
│ │ ├── CommandType.cs
│ │ ├── CustomCommandManager.cs
│ │ ├── CustomCommandManagerSession.cs
│ │ ├── CustomCommandRegistration.cs
│ │ ├── CustomCommandType.cs
│ │ ├── CustomCommandUtils.cs
│ │ ├── CustomObjectBase.cs
│ │ ├── CustomObjectCommand.cs
│ │ ├── CustomObjectCommandWrapper.cs
│ │ ├── CustomObjectFactory.cs
│ │ ├── CustomObjectFunctions.cs
│ │ ├── CustomProcedureBase.cs
│ │ ├── CustomProcedureWrapper.cs
│ │ ├── CustomRawStringCommand.cs
│ │ ├── CustomRawStringFunctions.cs
│ │ ├── CustomRespCommands.cs
│ │ ├── CustomTransaction.cs
│ │ ├── CustomTransactionProcedure.cs
│ │ ├── ExpandableMap.cs
│ │ ├── ICustomCommand.cs
│ │ └── ObjectInputExtensions.cs
│ ├── Databases
│ │ ├── DatabaseManagerBase.cs
│ │ ├── DatabaseManagerFactory.cs
│ │ ├── IDatabaseManager.cs
│ │ ├── MultiDatabaseManager.cs
│ │ └── SingleDatabaseManager.cs
│ ├── ExpireOption.cs
│ ├── Garnet.server.csproj
│ ├── GarnetDatabase.cs
│ ├── GlobUtils.cs
│ ├── InputHeader.cs
│ ├── LogCompactionType.cs
│ ├── Lua
│ │ ├── ILuaAllocator.cs
│ │ ├── LuaCommands.cs
│ │ ├── LuaLimitedManagedAllocator.cs
│ │ ├── LuaManagedAllocator.cs
│ │ ├── LuaOptions.cs
│ │ ├── LuaRunner.Functions.cs
│ │ ├── LuaRunner.Loader.cs
│ │ ├── LuaRunner.Strings.cs
│ │ ├── LuaRunner.cs
│ │ ├── LuaStateWrapper.cs
│ │ ├── LuaTimeoutManager.cs
│ │ ├── LuaTrackedAllocator.cs
│ │ ├── NativeMethods.cs
│ │ ├── ScratchBufferNetworkSender.cs
│ │ ├── ScriptHashKey.cs
│ │ └── SessionScriptCache.cs
│ ├── Metrics
│ │ ├── GarnetServerMetrics.cs
│ │ ├── GarnetServerMonitor.cs
│ │ ├── GarnetSessionMetrics.cs
│ │ ├── IMetrics.cs
│ │ ├── Info
│ │ │ ├── GarnetInfoMetrics.cs
│ │ │ ├── InfoCommand.cs
│ │ │ └── InfoHelp.cs
│ │ ├── Latency
│ │ │ ├── GarnetLatencyMetrics.cs
│ │ │ ├── GarnetLatencyMetricsSession.cs
│ │ │ ├── LatencyMetricsEntry.cs
│ │ │ ├── LatencyMetricsEntrySession.cs
│ │ │ ├── RespLatencyCommands.cs
│ │ │ └── RespLatencyHelp.cs
│ │ ├── Slowlog
│ │ │ ├── RespSlowlogCommands.cs
│ │ │ ├── RespSlowlogHelp.cs
│ │ │ ├── SlowLogContainer.cs
│ │ │ └── SlowlogEntry.cs
│ │ └── SystemMetrics.cs
│ ├── Module
│ │ ├── ModuleRegistrar.cs
│ │ └── ModuleUtils.cs
│ ├── Objects
│ │ ├── Hash
│ │ │ ├── HashObject.cs
│ │ │ └── HashObjectImpl.cs
│ │ ├── ItemBroker
│ │ │ ├── CollectionItemBroker.cs
│ │ │ ├── CollectionItemBrokerEvent.cs
│ │ │ ├── CollectionItemObserver.cs
│ │ │ └── CollectionItemResult.cs
│ │ ├── List
│ │ │ ├── ListObject.cs
│ │ │ └── ListObjectImpl.cs
│ │ ├── Set
│ │ │ ├── SetObject.cs
│ │ │ └── SetObjectImpl.cs
│ │ ├── SortedSet
│ │ │ ├── SortedSetObject.cs
│ │ │ └── SortedSetObjectImpl.cs
│ │ ├── SortedSetComparer.cs
│ │ ├── SortedSetGeo
│ │ │ ├── GeoHash.cs
│ │ │ ├── GeoSearchOptions.cs
│ │ │ └── SortedSetGeoObjectImpl.cs
│ │ └── Types
│ │ │ ├── ByteArrayBinaryObjectSerializer.cs
│ │ │ ├── GarnetObject.cs
│ │ │ ├── GarnetObjectBase.cs
│ │ │ ├── GarnetObjectSerializer.cs
│ │ │ ├── GarnetObjectStoreOutput.cs
│ │ │ ├── GarnetObjectType.cs
│ │ │ ├── IGarnetObject.cs
│ │ │ ├── SerializationPhase.cs
│ │ │ └── SerializationState.cs
│ ├── OperationError.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Providers
│ │ ├── GarnetProvider.cs
│ │ └── TsavoriteKVProviderBase.cs
│ ├── PubSub
│ │ ├── PatternSubscriptionEntry.cs
│ │ └── SubscribeBroker.cs
│ ├── Resp
│ │ ├── ACLCommands.cs
│ │ ├── AdminCommands.cs
│ │ ├── ArrayCommands.cs
│ │ ├── AsyncProcessor.cs
│ │ ├── BasicCommands.cs
│ │ ├── BasicEtagCommands.cs
│ │ ├── Bitmap
│ │ │ ├── BitmapCommands.cs
│ │ │ ├── BitmapManager.cs
│ │ │ ├── BitmapManagerBitCount.cs
│ │ │ ├── BitmapManagerBitOp.cs
│ │ │ ├── BitmapManagerBitPos.cs
│ │ │ └── BitmapManagerBitfield.cs
│ │ ├── ByteArrayComparer.cs
│ │ ├── ClientCommands.cs
│ │ ├── CmdStrings.cs
│ │ ├── GarnetDatabaseSession.cs
│ │ ├── HyperLogLog
│ │ │ ├── HyperLogLog.cs
│ │ │ └── HyperLogLogCommands.cs
│ │ ├── IRespSerializable.cs
│ │ ├── KeyAdminCommands.cs
│ │ ├── LocalServerSession.cs
│ │ ├── Objects
│ │ │ ├── HashCommands.cs
│ │ │ ├── ListCommands.cs
│ │ │ ├── ObjectStoreUtils.cs
│ │ │ ├── SetCommands.cs
│ │ │ ├── SharedObjectCommands.cs
│ │ │ ├── SortedSetCommands.cs
│ │ │ └── SortedSetGeoCommands.cs
│ │ ├── Parser
│ │ │ ├── ParseUtils.cs
│ │ │ ├── RespCommand.cs
│ │ │ └── SessionParseState.cs
│ │ ├── PubSubCommands.cs
│ │ ├── PurgeBPCommand.cs
│ │ ├── RespCommandAccessor.cs
│ │ ├── RespCommandArgument.cs
│ │ ├── RespCommandDataCommon.cs
│ │ ├── RespCommandDataProvider.cs
│ │ ├── RespCommandDocs.cs
│ │ ├── RespCommandInfoFlags.cs
│ │ ├── RespCommandKeySpecification.cs
│ │ ├── RespCommandsInfo.cs
│ │ ├── RespEnums.cs
│ │ ├── RespServerSession.cs
│ │ ├── RespServerSessionSlotVerify.cs
│ │ ├── ScriptHashOwner.cs
│ │ └── SessionLogger.cs
│ ├── ServerConfig.cs
│ ├── ServerConfigType.cs
│ ├── Servers
│ │ ├── GarnetServerBase.cs
│ │ ├── GarnetServerOptions.cs
│ │ ├── GarnetServerTcp.cs
│ │ ├── IGarnetServer.cs
│ │ ├── IServerSerializer.cs
│ │ ├── MetricsApi.cs
│ │ ├── RegisterApi.cs
│ │ ├── ServerOptions.cs
│ │ ├── ServerTcpNetworkHandler.cs
│ │ └── StoreApi.cs
│ ├── SessionParseStateExtensions.cs
│ ├── Sessions
│ │ ├── ISessionProvider.cs
│ │ └── ServerSessionBase.cs
│ ├── SortedSetAggregateType.cs
│ ├── SpanByteFunctionsForServer.cs
│ ├── SpanByteServerSerializer.cs
│ ├── Storage
│ │ ├── Functions
│ │ │ ├── EtagState.cs
│ │ │ ├── FunctionsState.cs
│ │ │ ├── MainStore
│ │ │ │ ├── CallbackMethods.cs
│ │ │ │ ├── DeleteMethods.cs
│ │ │ │ ├── MainSessionFunctions.cs
│ │ │ │ ├── PrivateMethods.cs
│ │ │ │ ├── RMWMethods.cs
│ │ │ │ ├── ReadMethods.cs
│ │ │ │ ├── UpsertMethods.cs
│ │ │ │ └── VarLenInputMethods.cs
│ │ │ └── ObjectStore
│ │ │ │ ├── CallbackMethods.cs
│ │ │ │ ├── DeleteMethods.cs
│ │ │ │ ├── ObjectSessionFunctions.cs
│ │ │ │ ├── PrivateMethods.cs
│ │ │ │ ├── RMWMethods.cs
│ │ │ │ ├── ReadMethods.cs
│ │ │ │ ├── UpsertMethods.cs
│ │ │ │ └── VarLenInputMethods.cs
│ │ ├── Session
│ │ │ ├── Common
│ │ │ │ ├── ArrayKeyIterationFunctions.cs
│ │ │ │ └── MemoryUtils.cs
│ │ │ ├── MainStore
│ │ │ │ ├── AdvancedOps.cs
│ │ │ │ ├── BitmapOps.cs
│ │ │ │ ├── CompletePending.cs
│ │ │ │ ├── HyperLogLogOps.cs
│ │ │ │ └── MainStoreOps.cs
│ │ │ ├── Metrics.cs
│ │ │ ├── ObjectStore
│ │ │ │ ├── AdvancedOps.cs
│ │ │ │ ├── Common.cs
│ │ │ │ ├── CompletePending.cs
│ │ │ │ ├── HashOps.cs
│ │ │ │ ├── ListOps.cs
│ │ │ │ ├── SetOps.cs
│ │ │ │ ├── SortedSetGeoOps.cs
│ │ │ │ └── SortedSetOps.cs
│ │ │ └── StorageSession.cs
│ │ └── SizeTracker
│ │ │ └── CacheSizeTracker.cs
│ ├── StoreWrapper.cs
│ ├── TLS
│ │ ├── CertificateUtils.cs
│ │ ├── GarnetTlsOptions.cs
│ │ ├── IGarnetTlsOptions.cs
│ │ └── ServerCertificateSelector.cs
│ └── Transaction
│ │ ├── TransactionManager.cs
│ │ ├── TxnClusterSlotCheck.cs
│ │ ├── TxnKeyEntry.cs
│ │ ├── TxnKeyEntryComparison.cs
│ │ ├── TxnKeyManager.cs
│ │ ├── TxnRespCommands.cs
│ │ ├── TxnState.cs
│ │ ├── TxnWatchedKeysContainer.cs
│ │ ├── WatchVersionMap.cs
│ │ └── WatchedKeySlice.cs
└── storage
│ └── Tsavorite
│ ├── .gitignore
│ ├── README.md
│ ├── cc
│ ├── CMakeLists.txt
│ ├── README.md
│ └── src
│ │ ├── CMakeLists.txt
│ │ └── device
│ │ ├── alloc.h
│ │ ├── async.h
│ │ ├── auto_ptr.h
│ │ ├── constants.h
│ │ ├── file.h
│ │ ├── file_common.h
│ │ ├── file_linux.cc
│ │ ├── file_linux.h
│ │ ├── file_system_disk.h
│ │ ├── file_windows.cc
│ │ ├── file_windows.h
│ │ ├── gc_state.h
│ │ ├── guid.h
│ │ ├── light_epoch.h
│ │ ├── lss_allocator.cc
│ │ ├── lss_allocator.h
│ │ ├── native_device.h
│ │ ├── native_device_wrapper.cc
│ │ ├── phase.h
│ │ ├── status.h
│ │ ├── thread.h
│ │ ├── thread_manual.cc
│ │ └── utility.h
│ └── cs
│ ├── README.md
│ ├── Tsavorite.sln
│ ├── benchmark
│ ├── BDN-Tsavorite.Benchmark
│ │ ├── BDN-Tsavorite.benchmark.csproj
│ │ ├── BenchmarkDotNetTestsApp.cs
│ │ ├── InliningTests.cs
│ │ └── IterationTests.cs
│ └── YCSB.benchmark
│ │ ├── ConcurrentDictionaryBenchmark.cs
│ │ ├── FixedLenYcsbBenchmark.cs
│ │ ├── Input.cs
│ │ ├── Key.cs
│ │ ├── KeySpanByte.cs
│ │ ├── Options.cs
│ │ ├── Output.cs
│ │ ├── Program.cs
│ │ ├── RandomGenerator.cs
│ │ ├── SessionFunctions.cs
│ │ ├── SessionSpanByteFunctions.cs
│ │ ├── SpanByteYcsbBenchmark.cs
│ │ ├── TestLoader.cs
│ │ ├── TestStats.cs
│ │ ├── Value.cs
│ │ ├── YCSB.benchmark.csproj
│ │ ├── YcsbConstants.cs
│ │ ├── ZipfGenerator.cs
│ │ └── scripts
│ │ ├── compare_runs.ps1
│ │ └── run_benchmark.ps1
│ ├── src
│ ├── core
│ │ ├── Allocator
│ │ │ ├── AllocatorBase.cs
│ │ │ ├── AllocatorRecord.cs
│ │ │ ├── AllocatorScan.cs
│ │ │ ├── AllocatorSettings.cs
│ │ │ ├── AsyncIOContext.cs
│ │ │ ├── AtomicOwner.cs
│ │ │ ├── BlittableAllocator.cs
│ │ │ ├── BlittableAllocatorImpl.cs
│ │ │ ├── BlittableFrame.cs
│ │ │ ├── BlittableScanIterator.cs
│ │ │ ├── ErrorList.cs
│ │ │ ├── GenericAllocator.cs
│ │ │ ├── GenericAllocatorImpl.cs
│ │ │ ├── GenericFrame.cs
│ │ │ ├── GenericScanIterator.cs
│ │ │ ├── IAllocator.cs
│ │ │ ├── IAllocatorCallbacks.cs
│ │ │ ├── IScanIteratorFunctions.cs
│ │ │ ├── IStreamingSnapshotIteratorFunctions.cs
│ │ │ ├── ITsavoriteScanIterator.cs
│ │ │ ├── MallocFixedPageSize.cs
│ │ │ ├── MemoryPageScanIterator.cs
│ │ │ ├── PageUnit.cs
│ │ │ ├── PendingFlushList.cs
│ │ │ ├── ScanCursorState.cs
│ │ │ ├── ScanIteratorBase.cs
│ │ │ ├── SpanByteAllocator.cs
│ │ │ ├── SpanByteAllocatorImpl.cs
│ │ │ ├── SpanByteScanIterator.cs
│ │ │ ├── WorkQueueFIFO.cs
│ │ │ └── WorkQueueLIFO.cs
│ │ ├── Async
│ │ │ └── CompletePendingAsync.cs
│ │ ├── ClientSession
│ │ │ ├── BasicContext.cs
│ │ │ ├── ClientSession.cs
│ │ │ ├── IClientSession.cs
│ │ │ ├── ILockableContext.cs
│ │ │ ├── ITsavoriteContext.cs
│ │ │ ├── IUnsafeContext.cs
│ │ │ ├── LockableContext.cs
│ │ │ ├── LockableUnsafeContext.cs
│ │ │ ├── ManageClientSessions.cs
│ │ │ ├── SessionFunctionsWrapper.cs
│ │ │ └── UnsafeContext.cs
│ │ ├── Compaction
│ │ │ ├── CompactionType.cs
│ │ │ ├── ICompactionFunctions.cs
│ │ │ ├── LogCompactionFunctions.cs
│ │ │ └── TsavoriteCompaction.cs
│ │ ├── Device
│ │ │ ├── AsyncPool.cs
│ │ │ ├── Devices.cs
│ │ │ ├── IDevice.cs
│ │ │ ├── LocalMemoryDevice.cs
│ │ │ ├── LocalStorageDevice.cs
│ │ │ ├── ManagedLocalStorageDevice.cs
│ │ │ ├── NativeStorageDevice.cs
│ │ │ ├── NullDevice.cs
│ │ │ ├── ShardedStorageDevice.cs
│ │ │ ├── StorageDeviceBase.cs
│ │ │ ├── TieredStorageDevice.cs
│ │ │ └── runtimes
│ │ │ │ ├── linux-x64
│ │ │ │ └── native
│ │ │ │ │ └── libnative_device.so
│ │ │ │ └── win-x64
│ │ │ │ └── native
│ │ │ │ ├── native_device.dll
│ │ │ │ └── native_device.pdb
│ │ ├── Epochs
│ │ │ └── LightEpoch.cs
│ │ ├── Index
│ │ │ ├── CheckpointManagement
│ │ │ │ ├── DefaultCheckpointNamingScheme.cs
│ │ │ │ ├── DeviceLogCommitCheckpointManager.cs
│ │ │ │ ├── ICheckpointNamingScheme.cs
│ │ │ │ ├── INamedDeviceFactory.cs
│ │ │ │ ├── INamedDeviceFactoryCreator.cs
│ │ │ │ ├── LocalStorageNamedDeviceFactory.cs
│ │ │ │ ├── LocalStorageNamedDeviceFactoryCreator.cs
│ │ │ │ ├── NullNamedDeviceFactory.cs
│ │ │ │ ├── NullNamedDeviceFactoryCreator.cs
│ │ │ │ └── RecoveryInfo.cs
│ │ │ ├── Checkpointing
│ │ │ │ ├── Checkpoint.cs
│ │ │ │ ├── FoldOverSMTask.cs
│ │ │ │ ├── FullCheckpointSM.cs
│ │ │ │ ├── HybridLogCheckpointSM.cs
│ │ │ │ ├── HybridLogCheckpointSMTask.cs
│ │ │ │ ├── IStateMachine.cs
│ │ │ │ ├── IStateMachineCallback.cs
│ │ │ │ ├── IStateMachineTask.cs
│ │ │ │ ├── IncrementalSnapshotCheckpointSMTask.cs
│ │ │ │ ├── IndexCheckpointSM.cs
│ │ │ │ ├── IndexCheckpointSMTask.cs
│ │ │ │ ├── IndexResizeSM.cs
│ │ │ │ ├── IndexResizeSMTask.cs
│ │ │ │ ├── SnapshotCheckpointSMTask.cs
│ │ │ │ ├── StateMachineBase.cs
│ │ │ │ ├── StateMachineDriver.cs
│ │ │ │ ├── StateTransitions.cs
│ │ │ │ ├── StreamingSnapshotCheckpointSM.cs
│ │ │ │ ├── StreamingSnapshotCheckpointSMTask.cs
│ │ │ │ ├── StreamingSnapshotTsavoriteKV.cs
│ │ │ │ ├── TsavoriteStateMachineProperties.cs
│ │ │ │ └── VersionChangeSM.cs
│ │ │ ├── Common
│ │ │ │ ├── AddressInfo.cs
│ │ │ │ ├── CheckpointSettings.cs
│ │ │ │ ├── CompletedOutput.cs
│ │ │ │ ├── ConcurrentCounter.cs
│ │ │ │ ├── ExecutionContext.cs
│ │ │ │ ├── HeapContainer.cs
│ │ │ │ ├── KVSettings.cs
│ │ │ │ ├── LogSettings.cs
│ │ │ │ ├── LogSizeTracker.cs
│ │ │ │ ├── OperationOptions.cs
│ │ │ │ ├── OperationStatus.cs
│ │ │ │ ├── PendingContext.cs
│ │ │ │ ├── ReadCacheSettings.cs
│ │ │ │ ├── RecordInfo.cs
│ │ │ │ ├── RecordMetadata.cs
│ │ │ │ └── SingleWaiterAutoResetEvent.cs
│ │ │ ├── Interfaces
│ │ │ │ ├── CallbackInfos.cs
│ │ │ │ ├── DataContractObjectSerializer.cs
│ │ │ │ ├── IKeyComparer.cs
│ │ │ │ ├── IObjectSerializer.cs
│ │ │ │ ├── ISessionFunctions.cs
│ │ │ │ ├── ISessionFunctionsWrapper.cs
│ │ │ │ ├── ISessionLocker.cs
│ │ │ │ ├── KeyComparers.cs
│ │ │ │ ├── ObjectSerializer.cs
│ │ │ │ ├── SessionFunctionsBase.cs
│ │ │ │ └── TryAddFunctions.cs
│ │ │ ├── Recovery
│ │ │ │ ├── Checkpoint.cs
│ │ │ │ ├── DeltaLog.cs
│ │ │ │ ├── FileDescriptor.cs
│ │ │ │ ├── ICheckpointManager.cs
│ │ │ │ ├── IndexCheckpoint.cs
│ │ │ │ ├── IndexRecovery.cs
│ │ │ │ └── Recovery.cs
│ │ │ ├── StoreFunctions
│ │ │ │ ├── DisposeReason.cs
│ │ │ │ ├── IRecordDisposer.cs
│ │ │ │ ├── IStoreFunctions.cs
│ │ │ │ └── StoreFunctions.cs
│ │ │ └── Tsavorite
│ │ │ │ ├── Constants.cs
│ │ │ │ ├── Extensions.cs
│ │ │ │ ├── HashBucket.cs
│ │ │ │ ├── HashBucketEntry.cs
│ │ │ │ ├── Implementation
│ │ │ │ ├── BlockAllocate.cs
│ │ │ │ ├── ConditionalCopyToTail.cs
│ │ │ │ ├── ContainsKeyInMemory.cs
│ │ │ │ ├── ContinuePending.cs
│ │ │ │ ├── EpochOperations.cs
│ │ │ │ ├── FindRecord.cs
│ │ │ │ ├── HandleOperationStatus.cs
│ │ │ │ ├── HashEntryInfo.cs
│ │ │ │ ├── Helpers.cs
│ │ │ │ ├── InternalDelete.cs
│ │ │ │ ├── InternalLock.cs
│ │ │ │ ├── InternalRMW.cs
│ │ │ │ ├── InternalRead.cs
│ │ │ │ ├── InternalUpsert.cs
│ │ │ │ ├── Locking
│ │ │ │ │ ├── ILockTable.cs
│ │ │ │ │ ├── OverflowBucketLockTable.cs
│ │ │ │ │ └── TransientLocking.cs
│ │ │ │ ├── ModifiedBitOperation.cs
│ │ │ │ ├── OperationStackContext.cs
│ │ │ │ ├── ReadCache.cs
│ │ │ │ ├── RecordSource.cs
│ │ │ │ ├── Revivification
│ │ │ │ │ ├── CheckEmptyWorker.cs
│ │ │ │ │ ├── FreeRecordPool.cs
│ │ │ │ │ ├── RecordLengths.cs
│ │ │ │ │ ├── RevivificationManager.cs
│ │ │ │ │ ├── RevivificationSettings.cs
│ │ │ │ │ └── RevivificationStats.cs
│ │ │ │ ├── SplitIndex.cs
│ │ │ │ ├── TryCopyToReadCache.cs
│ │ │ │ └── TryCopyToTail.cs
│ │ │ │ ├── LogAccessor.cs
│ │ │ │ ├── Tsavorite.cs
│ │ │ │ ├── TsavoriteBase.cs
│ │ │ │ ├── TsavoriteIterator.cs
│ │ │ │ ├── TsavoriteThread.cs
│ │ │ │ └── WriteReason.cs
│ │ ├── Tsavorite.core.csproj
│ │ ├── TsavoriteLog
│ │ │ ├── CommitFailureException.cs
│ │ │ ├── CommitInfo.cs
│ │ │ ├── ILogCommitManager.cs
│ │ │ ├── ILogEnqueueEntry.cs
│ │ │ ├── ILogEntryConsumer.cs
│ │ │ ├── IReadOnlySpanBatch.cs
│ │ │ ├── IStoreInput.cs
│ │ │ ├── LogCommitPolicy.cs
│ │ │ ├── TsavoriteLog.cs
│ │ │ ├── TsavoriteLogIterator.cs
│ │ │ ├── TsavoriteLogRecoveryInfo.cs
│ │ │ ├── TsavoriteLogScanSingleIterator.cs
│ │ │ └── TsavoriteLogSettings.cs
│ │ ├── Utilities
│ │ │ ├── AsyncCountDown.cs
│ │ │ ├── AsyncQueue.cs
│ │ │ ├── AsyncResultTypes.cs
│ │ │ ├── BufferPool.cs
│ │ │ ├── CompletionEvent.cs
│ │ │ ├── LockType.cs
│ │ │ ├── Native32.cs
│ │ │ ├── OverflowPool.cs
│ │ │ ├── PageAsyncResultTypes.cs
│ │ │ ├── SafeConcurrentDictionary.cs
│ │ │ ├── Status.cs
│ │ │ ├── StatusCode.cs
│ │ │ ├── TsavoriteException.cs
│ │ │ └── Utility.cs
│ │ └── VarLen
│ │ │ ├── IVariableLengthInput.cs
│ │ │ ├── SpanByte.cs
│ │ │ ├── SpanByteAndMemory.cs
│ │ │ ├── SpanByteComparer.cs
│ │ │ ├── SpanByteFunctions.cs
│ │ │ ├── SpanByteHeapContainer.cs
│ │ │ └── UnmanagedMemoryManager.cs
│ └── devices
│ │ └── AzureStorageDevice
│ │ ├── AzureCheckpointNamingScheme.cs
│ │ ├── AzureStorageDevice.cs
│ │ ├── AzureStorageNamedDeviceFactory.cs
│ │ ├── AzureStorageNamedDeviceFactoryCreator.cs
│ │ ├── BlobEntry.cs
│ │ ├── BlobManager.cs
│ │ ├── BlobUtils.cs
│ │ ├── BlobUtilsV12.cs
│ │ ├── IBlobManager.cs
│ │ ├── IStorageErrorHandler.cs
│ │ ├── LeaseTimer.cs
│ │ ├── StorageErrorHandler.cs
│ │ ├── StorageOperations.cs
│ │ ├── TrackedThreads.cs
│ │ ├── Tsavorite.devices.AzureStorageDevice.csproj
│ │ ├── TsavoriteTraceHelper.cs
│ │ └── Utils.cs
│ └── test
│ ├── BasicLockTests.cs
│ ├── BasicStorageTests.cs
│ ├── BasicTests.cs
│ ├── BlittableIterationTests.cs
│ ├── BlittableLogCompactionTests.cs
│ ├── BlittableLogScanTests.cs
│ ├── CancellationTests.cs
│ ├── CheckpointManagerTests.cs
│ ├── CompletePendingTests.cs
│ ├── ComponentRecoveryTests.cs
│ ├── ConcurrentCounterTests.cs
│ ├── DeltaLogTests.cs
│ ├── DeviceLogTests.cs
│ ├── DeviceTests.cs
│ ├── EnqueueAndWaitForCommit.cs
│ ├── EnqueueTests.cs
│ ├── EpochProtectedVersionScheme.cs
│ ├── ExpirationTests.cs
│ ├── FlakyDeviceTests.cs
│ ├── FunctionPerSessionTests.cs
│ ├── GenericByteArrayTests.cs
│ ├── GenericDiskDeleteTests.cs
│ ├── GenericIterationTests.cs
│ ├── GenericLogCompactionTests.cs
│ ├── GenericLogScanTests.cs
│ ├── GenericStringTests.cs
│ ├── InputOutputParameterTests.cs
│ ├── InsertAtTailSpanByteStressTests.cs
│ ├── LargeObjectTests.cs
│ ├── LockableUnsafeContextTests.cs
│ ├── LogAndDeviceConfigTests.cs
│ ├── LogFastCommitTests.cs
│ ├── LogFormatter.cs
│ ├── LogReadAsyncTests.cs
│ ├── LogRecoverReadOnlyTests.cs
│ ├── LogResumeTests.cs
│ ├── LogScanTests.cs
│ ├── LogShiftTailStressTest.cs
│ ├── LogTests.cs
│ ├── LowMemoryTests.cs
│ ├── MallocFixedPageSizeTests.cs
│ ├── ManagedLocalStorageTests.cs
│ ├── MiscTests.cs
│ ├── ModifiedBitTests.cs
│ ├── MoreLogCompactionTests.cs
│ ├── NUnitLoggerProvider.cs
│ ├── NameValidator.cs
│ ├── NativeReadCacheTests.cs
│ ├── NeedCopyUpdateTests.cs
│ ├── ObjectReadCacheTests.cs
│ ├── ObjectRecoveryTest.cs
│ ├── ObjectRecoveryTest2.cs
│ ├── ObjectRecoveryTest3.cs
│ ├── ObjectRecoveryTestTypes.cs
│ ├── ObjectTestTypes.cs
│ ├── ObjectTests.cs
│ ├── OverflowBucketLockTableTests.cs
│ ├── PostOperationsTests.cs
│ ├── ReadAddressTests.cs
│ ├── ReadCacheChainTests.cs
│ ├── RecoverReadOnlyTest.cs
│ ├── RecoveryChecks.cs
│ ├── RecoveryTestTypes.cs
│ ├── RecoveryTests.cs
│ ├── ReproReadCacheTest.cs
│ ├── RevivificationTests.cs
│ ├── SessionTests.cs
│ ├── SharedDirectoryTests.cs
│ ├── SimpleRecoveryTest.cs
│ ├── SimpleTests.cs
│ ├── SimpleVersionSchemeTest.cs
│ ├── SimulatedFlakyDevice.cs
│ ├── SingleWriterTests.cs
│ ├── SpanByteIterationTests.cs
│ ├── SpanByteLogScanTests.cs
│ ├── SpanByteTests.cs
│ ├── SpanByteVLVectorTests.cs
│ ├── StateMachineDriverTests.cs
│ ├── StructWithStringTests.cs
│ ├── TestTypes.cs
│ ├── TestUtils.cs
│ ├── TryEnqueueBasicTests.cs
│ ├── Tsavorite.test.csproj
│ ├── UnsafeContextTests.cs
│ ├── VLVector.cs
│ └── WaitForCommit.cs
├── main
└── GarnetServer
│ ├── Extensions
│ ├── DeleteIfMatch.cs
│ ├── GetTwoKeysNoTxn.cs
│ ├── MGetIfPM.cs
│ ├── MSetPx.cs
│ ├── MyDictGet.cs
│ ├── MyDictObject.cs
│ ├── MyDictSet.cs
│ ├── ReadWriteTxn.cs
│ ├── SampleDeleteTxn.cs
│ ├── SampleUpdateTxn.cs
│ ├── SetIfPM.cs
│ ├── SetStringAndList.cs
│ ├── SetWPIfPGT.cs
│ └── Sum.cs
│ ├── GarnetServer.csproj
│ ├── Program.cs
│ ├── Properties
│ └── PublishProfiles
│ │ ├── linux-arm64-based.pubxml
│ │ ├── linux-x64-based.pubxml
│ │ ├── osx-arm64-based.pubxml
│ │ ├── osx-x64-based.pubxml
│ │ ├── portable.pubxml
│ │ ├── win-arm64-based-readytorun.pubxml
│ │ └── win-x64-based-readytorun.pubxml
│ ├── README.md
│ └── garnet.conf
├── metrics
└── HdrHistogram
│ ├── .editorconfig
│ ├── HdrHistogram.csproj
│ ├── HistogramBase.cs
│ ├── HistogramExtensions.cs
│ ├── IRecorder.cs
│ ├── Iteration
│ ├── AbstractHistogramEnumerator.cs
│ ├── AllValueEnumerable.cs
│ ├── AllValuesEnumerator.cs
│ ├── HistogramIterationValue.cs
│ ├── PercentileEnumerable.cs
│ ├── PercentileEnumerator.cs
│ ├── RecordedValuesEnumerable.cs
│ └── RecordedValuesEnumerator.cs
│ ├── LongConcurrentHistogram.cs
│ ├── LongHistogram.cs
│ ├── OutputScalingFactor.cs
│ ├── TimeStamp.cs
│ └── Utilities
│ ├── AtomicLongArray.cs
│ └── WriterReaderPhaser.cs
├── modules
├── GarnetJSON
│ ├── GarnetJSON.csproj
│ ├── GarnetJsonObject.cs
│ ├── JSONPath
│ │ ├── ArrayIndexFilter.cs
│ │ ├── ArrayMultipleIndexFilter.cs
│ │ ├── ArraySliceFilter.cs
│ │ ├── FieldFilter.cs
│ │ ├── FieldMultipleFilter.cs
│ │ ├── JsonExtensions.cs
│ │ ├── JsonPath.cs
│ │ ├── JsonSelectSettings.cs
│ │ ├── PathFilter.cs
│ │ ├── QueryExpression.cs
│ │ ├── QueryFilter.cs
│ │ ├── QueryScanFilter.cs
│ │ ├── RootFilter.cs
│ │ ├── ScanFilter.cs
│ │ └── ScanMultipleFilter.cs
│ ├── JsonCmdStrings.cs
│ ├── JsonCommands.cs
│ ├── JsonModule.cs
│ └── RespJsonEnums.cs
└── NoOpModule
│ ├── DummyObject.cs
│ ├── DummyObjectNoOpRMW.cs
│ ├── DummyObjectNoOpRead.cs
│ ├── NoOpCommandRMW.cs
│ ├── NoOpCommandRead.cs
│ ├── NoOpModule.cs
│ ├── NoOpModule.csproj
│ ├── NoOpProc.cs
│ └── NoOpTxn.cs
├── playground
├── Bitmap
│ ├── BitCount.cs
│ ├── BitOp.cs
│ ├── Bitmap.csproj
│ ├── Common.cs
│ ├── MemoryPoolBuffers.cs
│ └── Program.cs
├── ClusterStress
│ ├── ClusterOptions.cs
│ ├── ClusterStress.csproj
│ ├── OnlineReqGen.cs
│ ├── Program.cs
│ ├── ReqGenForCluster.cs
│ ├── ReqGenSharded.cs
│ ├── ReqGenUtilsCluster.cs
│ ├── ShardedRespOnlineBench.cs
│ └── ShardedRespPerfBench.cs
├── CommandInfoUpdater
│ ├── CommandDocsUpdater.cs
│ ├── CommandInfoUpdater.cs
│ ├── CommandInfoUpdater.csproj
│ ├── CommonUtils.cs
│ ├── GarnetCommandsDocs.json
│ ├── GarnetCommandsInfo.json
│ ├── Options.cs
│ ├── Program.cs
│ ├── RespCommandDocsParser.cs
│ ├── RespCommandInfoParser.cs
│ └── SupportedCommand.cs
├── Embedded.perftest
│ ├── Embedded.perftest.csproj
│ ├── EmbeddedPerformanceTest.cs
│ ├── Operation.cs
│ ├── Options.cs
│ ├── PerformanceTestLoggerProvider.cs
│ └── Program.cs
├── GarnetClientStress
│ ├── GarnetClientStress.csproj
│ ├── Options.cs
│ ├── Program.cs
│ ├── ProgressBar.cs
│ ├── SimpleStressTests.cs
│ ├── StressTestUtil.cs
│ └── TaskScaling.cs
├── MigrateBench
│ ├── BenchmarkLoggerProvider.cs
│ ├── Common.cs
│ ├── MigrateBench.csproj
│ ├── MigrateRequest.cs
│ ├── MigrateSlotWalk.cs
│ ├── Options.cs
│ └── Program.cs
├── SampleModule
│ ├── SampleModule.cs
│ └── SampleModule.csproj
└── TstRunner
│ ├── Program.cs
│ └── TstRunner.csproj
├── samples
├── ETag
│ ├── Caching.cs
│ ├── ETag.csproj
│ ├── EtagAbstractions.cs
│ ├── OccSimulation.cs
│ └── Program.cs
├── GarnetClientSample
│ ├── GarnetClientSample.csproj
│ ├── GarnetClientSamples.cs
│ ├── Program.cs
│ └── SERedisSamples.cs
└── MetricsMonitor
│ ├── ClientMonitor.cs
│ ├── Configuration.cs
│ ├── MetricsMonitor.csproj
│ ├── Options.cs
│ └── Program.cs
├── test
├── BDNPerfTests
│ ├── BDN_Benchmark_Config.json
│ └── run_bdnperftest.ps1
├── Garnet.fuzz
│ ├── FuzzOptions.cs
│ ├── FuzzTargets.cs
│ ├── Garnet.fuzz.csproj
│ ├── Program.cs
│ └── Targets
│ │ ├── GarnetEndToEnd.cs
│ │ ├── IFuzzerTarget.cs
│ │ ├── LuaScriptCompilation.cs
│ │ └── RespCommandParsing.cs
├── Garnet.test.cluster
│ ├── ClientClusterConfig.cs
│ ├── ClusterAadAuthTests.cs
│ ├── ClusterAuthCommsTests.cs
│ ├── ClusterConfigTests.cs
│ ├── ClusterManagementTests.cs
│ ├── ClusterMigrateTLSTests.cs
│ ├── ClusterMigrateTests.cs
│ ├── ClusterNegativeTests.cs
│ ├── ClusterRedirectTests.cs
│ ├── ClusterTestContext.cs
│ ├── ClusterTestUtils.cs
│ ├── Garnet.test.cluster.csproj
│ ├── JwtTokenHelpers.cs
│ ├── RedirectTests
│ │ ├── BaseCommand.cs
│ │ ├── ClusterSlotVerificationTests.cs
│ │ └── TestClusterProc.cs
│ ├── ReplicationTests
│ │ ├── ClusterReplicationAsyncReplay.cs
│ │ ├── ClusterReplicationBaseTests.cs
│ │ ├── ClusterReplicationDisklessSyncTests.cs
│ │ └── ClusterReplicationTLS.cs
│ └── packages.config
├── Garnet.test
│ ├── CacheSizeTrackerTests.cs
│ ├── CredentialManager.cs
│ ├── CustomRespCommandsDocs.json
│ ├── CustomRespCommandsInfo.json
│ ├── DeleteTxn.cs
│ ├── DocsTests.cs
│ ├── Extensions
│ │ ├── ProcCustomCmd.cs
│ │ ├── RateLimiterTxn.cs
│ │ ├── SortedSetCountTxn.cs
│ │ └── TxnCustomCmd.cs
│ ├── Garnet.test.csproj
│ ├── GarnetBitmapTests.cs
│ ├── GarnetClientTests.cs
│ ├── GarnetJSON
│ │ ├── JSONPath
│ │ │ ├── JsonAssert.cs
│ │ │ ├── JsonPathExecuteTests.cs
│ │ │ ├── JsonPathParseTests.cs
│ │ │ └── QueryExpressionTests.cs
│ │ └── JsonCommandsTest.cs
│ ├── GarnetObjectTests.cs
│ ├── GarnetServerConfigTests.cs
│ ├── GeoHashTests.cs
│ ├── HyperLogLogTests.cs
│ ├── IndexGrowthTests.cs
│ ├── LuaScriptRunnerTests.cs
│ ├── LuaScriptTests.cs
│ ├── MultiDatabaseTests.cs
│ ├── NUnitLoggerProvider.cs
│ ├── NetworkTests.cs
│ ├── NumUtils.cs
│ ├── ObjectExpiryTxn.cs
│ ├── ObjectTestsForOutput.cs
│ ├── ReadCacheTests.cs
│ ├── ReqGen.cs
│ ├── Resp
│ │ ├── ACL
│ │ │ ├── AclConfigurationFileTests.cs
│ │ │ ├── AclParserTests.cs
│ │ │ ├── AclTest.cs
│ │ │ ├── BasicTests.cs
│ │ │ ├── DeleteUserTests.cs
│ │ │ ├── GetUserTests.cs
│ │ │ ├── ParallelTests.cs
│ │ │ ├── RespCommandTests.cs
│ │ │ ├── SetUserTests.cs
│ │ │ └── UserAclResult.cs
│ │ ├── GarnetAuthenticatorTests.cs
│ │ └── RespReadUtilsTests.cs
│ ├── RespAdminCommandsTests.cs
│ ├── RespAofAzureTests.cs
│ ├── RespAofTests.cs
│ ├── RespBlockingCollectionTests.cs
│ ├── RespCommandTests.cs
│ ├── RespCustomCommandTests.cs
│ ├── RespEtagTests.cs
│ ├── RespGetLowMemoryTests.cs
│ ├── RespHashTests.cs
│ ├── RespInfoTests.cs
│ ├── RespListGarnetClientTests.cs
│ ├── RespListTests.cs
│ ├── RespLowMemoryTests.cs
│ ├── RespMetricsTest.cs
│ ├── RespModuleTests.cs
│ ├── RespPubSubTests.cs
│ ├── RespScanCommandsTests.cs
│ ├── RespSetTest.cs
│ ├── RespSlowLogTests.cs
│ ├── RespSortedSetGarnetClientTests.cs
│ ├── RespSortedSetGeoTests.cs
│ ├── RespSortedSetTests.cs
│ ├── RespTests.cs
│ ├── RespTestsUtils.cs
│ ├── RespTlsTests.cs
│ ├── RespTransactionProcTests.cs
│ ├── ServerCredential.cs
│ ├── SortedSetRemoveTxn.cs
│ ├── TestProcedureBitmap.cs
│ ├── TestProcedureHLL.cs
│ ├── TestProcedureHash.cs
│ ├── TestProcedureLists.cs
│ ├── TestProcedureSet.cs
│ ├── TestProcedureSortedSets.cs
│ ├── TestProcess.cs
│ ├── TestUtils.cs
│ ├── TransactionTests.cs
│ ├── UnixSocketTests.cs
│ ├── WriteWithExpiryTxn.cs
│ ├── redis.conf
│ ├── runGarnetTests.cmd
│ ├── test.bat
│ └── test.sh
├── PerfRegressionTesting
│ ├── ConfigFiles
│ │ ├── CI_Config_Offline_Get_1Thr.json
│ │ ├── CI_Config_Offline_Get_MaxThr.json
│ │ ├── CI_Config_Offline_ZADDREM_1Thr.json
│ │ ├── CI_Config_Offline_ZADDREM_MaxThr.json
│ │ ├── CI_Config_Online_GetSet_1Thr.json
│ │ ├── CI_Config_Online_GetSet_MaxThr.json
│ │ ├── CI_Config_Online_ZADDZREM_1Thr.json
│ │ └── CI_Config_Online_ZADDZREM_MaxThr.json
│ └── run_benchmark.ps1
└── testcerts
│ ├── README.md
│ ├── garnet-ca.crt
│ ├── garnet-cert.crt
│ ├── garnet.key
│ └── testcert.pfx
└── website
├── .gitignore
├── README.md
├── babel.config.js
├── blog
├── 2024-03-17-a-brief-history-of-garnet.md
├── 2024-03-18-oss-announcement.md
├── 2025-01-18-etag-when-and-how.md
└── authors.yml
├── docs
├── benchmarking
│ ├── overview.md
│ ├── resp-bench.md
│ └── results-resp-bench.md
├── cluster
│ ├── key-migration.md
│ ├── overview.md
│ └── replication.md
├── commands
│ ├── acl.md
│ ├── analytics.md
│ ├── api-compatibility.md
│ ├── checkpoint.md
│ ├── client.md
│ ├── cluster.md
│ ├── data-structures.md
│ ├── garnet-specific.md
│ ├── generic-commands.md
│ ├── json.md
│ ├── overview.md
│ ├── raw-string.md
│ ├── scripting-and-functions.md
│ ├── server.md
│ └── transactions.md
├── dev
│ ├── cluster.md
│ ├── cluster
│ │ ├── migration.md
│ │ ├── overview.md
│ │ └── sharding.md
│ ├── code-structure.md
│ ├── collection-broker.md
│ ├── configuration.md
│ ├── contributing.md
│ ├── custom-commands.md
│ ├── garnet-api.md
│ ├── multi-db.md
│ ├── network.md
│ ├── onboarding.md
│ ├── processing.md
│ ├── transactions.md
│ └── tsavorite
│ │ ├── epochprotection.md
│ │ ├── intro.md
│ │ ├── locking.md
│ │ ├── reviv.md
│ │ └── storefunctions.md
├── extensions
│ ├── module.md
│ ├── objects.md
│ ├── overview.md
│ ├── procedure.md
│ ├── raw-strings.md
│ └── transactions.md
├── getting-started
│ ├── build.md
│ ├── compaction.md
│ ├── configuration.md
│ ├── memory.md
│ └── security.md
├── research
│ └── papers.md
└── welcome
│ ├── about-us.md
│ ├── compatibility.md
│ ├── faq.md
│ ├── features.md
│ ├── intro.md
│ ├── news.md
│ ├── releases.md
│ └── roadmap.md
├── docusaurus.config.js
├── package.json
├── sidebars.js
├── src
├── components
│ └── HomepageFeatures
│ │ ├── index.js
│ │ └── styles.module.css
├── css
│ └── custom.css
└── pages
│ ├── index.js
│ ├── index.module.css
│ └── markdown-page.md
├── static
├── .nojekyll
└── img
│ ├── benchmark
│ ├── lat-get-set-batchsize.png
│ ├── lat-get-set-threads.png
│ ├── tpt-bitop-batchsize.png
│ ├── tpt-bitop-threads.png
│ ├── tpt-get-batchsize.png
│ ├── tpt-get-threads.png
│ ├── tpt-getbit-setbit-batchsize.png
│ ├── tpt-getbit-setbit-threads.png
│ ├── tpt-pfadd-batchsize.png
│ ├── tpt-pfadd-few-keys.png
│ └── tpt-pfadd-many-keys.png
│ ├── favicon.ico
│ ├── garnet-bg2-2800x720.jpg
│ ├── garnet-bg2-2800x720.png
│ ├── garnet-logo-diamond.png
│ ├── garnet-logo-inset.png
│ ├── garnet-logo.png
│ ├── logo_128.png
│ ├── undraw_performance_overview_re_mqrq.svg
│ ├── undraw_scrum_board_re_wk7v.svg
│ └── undraw_secure_login_pdn4.svg
└── yarn.lock
/.azure/pipelines/credscan-exclusion.json:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Credential Scanner",
3 | "suppressions": [
4 | {
5 | "file": "testcert.pfx",
6 | "_justification": "Self-signed certificate used by unit tests."
7 | },
8 | {
9 | "file": "garnet.key",
10 | "_justification": "Legitimate app certificate file with private key required for the app to function. This is sample test application"
11 | },
12 | {
13 | "file": "AclConfigurationFileTests.cs",
14 | "_justification": "Passwords and secrets for a test users created and used for only running the tests."
15 | },
16 | {
17 | "file": "AclTest.cs",
18 | "_justification": "Passwords and secrets for a test users created and used for only running the tests."
19 | },
20 | {
21 | "file": "redis.key",
22 | "_justification": "Passwords and secrets for a test users created and used for only running the tests."
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/.azure/pipelines/extract_version.ps1:
--------------------------------------------------------------------------------
1 | <#$f
2 | .DESCRIPTION
3 |
4 | This script pulls the version number from Version.props which is located in the root directory.
5 | It then assigns the value to the BuildNumber which can be used in pipeline yml files
6 | #>
7 |
8 | $propsFile = Resolve-Path -Path "$PSScriptRoot/../../Version.props"
9 | [xml]$xml = Get-Content -Path $propsFile
10 | $version = $xml.Project.PropertyGroup.VersionPrefix
11 | Write-Host "##vso[build.updatebuildnumber]$version"
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | # Directories
2 | **/bin
3 | **/obj
4 | .git
5 | .vs
6 | .vscode
7 |
8 | # Files
9 | .gitignore
10 | **/*.md
11 | docker-compose.yml
12 | docker-compose.*.yml
13 | Dockerfile*
14 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Set the default behavior, in case people don't have core.autocrlf set.
2 | * text=auto
3 |
4 | # Explicitly declare text files you want to always be normalized and converted
5 | # to native line endings on checkout.
6 | *.cs text
7 | *.bat text
8 | *.sh text
9 | *.csproj text
10 | *.conf text
11 | *.cc text
12 | *.h text
13 |
14 | # Declare files that will always have CRLF line endings on checkout.
15 | *.sln text eol=crlf
16 |
17 | # Denote all files that are truly binary and should not be modified.
18 | *.png binary
19 | *.jpg binary
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Recommended by GitHub best practices to have a Code Owner defined especially for .GitHub folder
2 | # NOTE: Order is important; the last matching pattern takes the most precedence.
3 |
4 | # For Workflows used by GitHub Actions
5 | /.github/workflows/ @darrenge @badrishc @TedHartMS @TalZaccai
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Ask a Question
4 | url: https://github.com/microsoft/garnet/discussions/new/choose
5 | about: Please ask and answer questions for garnet here.
6 | - name: Read the Docs
7 | url: https://microsoft.github.io/garnet/
8 | about: Be sure you've read the docs!
--------------------------------------------------------------------------------
/.github/workflows/locker.yml:
--------------------------------------------------------------------------------
1 | name: Locker - Lock stale issues and PRs
2 | on:
3 | schedule:
4 | - cron: '0 9 * * *' # Once per day, early morning PT
5 |
6 | workflow_dispatch:
7 | # Manual triggering through the GitHub UI, API, or CLI
8 | inputs:
9 | daysSinceClose:
10 | required: true
11 | default: "60"
12 | daysSinceUpdate:
13 | required: true
14 | default: "60"
15 |
16 | permissions:
17 | issues: write
18 | pull-requests: write
19 |
20 | jobs:
21 | main:
22 | runs-on: ubuntu-latest
23 | steps:
24 | - name: Checkout Actions
25 | uses: actions/checkout@v4
26 | with:
27 | repository: "microsoft/vscode-github-triage-actions"
28 | path: ./actions
29 | ref: cd16cd2aad6ba2da74bb6c6f7293adddd579a90e # locker action commit sha
30 | - name: Install Actions
31 | run: npm install --production --prefix ./actions
32 | - name: Run Locker
33 | uses: ./actions/locker
34 | with:
35 | daysSinceClose: ${{ fromJson(inputs.daysSinceClose || 60) }}
36 | daysSinceUpdate: ${{ fromJson(inputs.daysSinceUpdate || 60) }}
37 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Microsoft Open Source Code of Conduct
2 |
3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4 |
5 | Resources:
6 |
7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 |
--------------------------------------------------------------------------------
/Dockerfile.nanoserver:
--------------------------------------------------------------------------------
1 | ARG TAG=ltsc2022
2 | FROM mcr.microsoft.com/dotnet/sdk:9.0-nanoserver-$TAG AS build
3 |
4 | ENV NUGET_PACKAGES=/src/pkg
5 |
6 | WORKDIR /src
7 |
8 | # Copy files
9 | COPY . .
10 |
11 | # Set protected mode to no for Docker images
12 | USER ContainerAdministrator
13 | RUN pwsh -Command "(Get-Content /src/libs/host/defaults.conf) -replace '\""ProtectedMode\"": \"yes\",', '\""ProtectedMode\"": \"no\",' | Set-Content /src/libs/host/defaults.conf"
14 | USER ContainerUser
15 |
16 | WORKDIR /src/main/GarnetServer
17 |
18 | # Restore, build, and publish
19 | RUN dotnet restore && \
20 | dotnet build -c Release -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false && \
21 | dotnet publish -c Release -o /app -r win-x64 --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false
22 |
23 | # Final stage/image
24 | FROM mcr.microsoft.com/dotnet/runtime:8.0-nanoserver-$TAG AS runtime
25 | WORKDIR /app
26 | COPY --from=build /app .
27 |
28 | # For inter-container communication.
29 | EXPOSE 6379
30 |
31 | ENTRYPOINT ["/app/GarnetServer"]
32 |
--------------------------------------------------------------------------------
/Garnet.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/garnet/529942b0a0af41cc2183a3026a5225b5276ae14d/Garnet.snk
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # Support
2 |
3 | ## How to file issues and get help
4 |
5 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing
6 | issues before filing new issues to avoid duplicates. For new issues, file your bug or
7 | feature request as a new Issue.
8 |
9 | For help and questions about using this project, please check our [website](https://microsoft.github.io/garnet).
10 |
11 | ## Microsoft Support Policy
12 |
13 | Support for Garnet is limited to the resources listed above.
14 |
--------------------------------------------------------------------------------
/Version.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1.0.69
5 |
6 |
7 |
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Cluster/ClusterParams.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | namespace BDN.benchmark.Cluster
5 | {
6 | ///
7 | /// Cluster parameters
8 | ///
9 | public struct ClusterParams
10 | {
11 | ///
12 | /// Whether to disable slot verification
13 | ///
14 | public bool disableSlotVerification;
15 |
16 | ///
17 | /// Constructor
18 | ///
19 | public ClusterParams(bool disableSlotVerification)
20 | {
21 | this.disableSlotVerification = disableSlotVerification;
22 | }
23 |
24 | ///
25 | /// String representation
26 | ///
27 | public override string ToString()
28 | {
29 | if (!disableSlotVerification)
30 | return "None";
31 |
32 | var ret = "";
33 | if (disableSlotVerification)
34 | ret += "DSV";
35 | return ret;
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Cluster/Request.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | namespace BDN.benchmark.Cluster
7 | {
8 | ///
9 | /// Request struct
10 | ///
11 | unsafe struct Request
12 | {
13 | public byte[] buffer;
14 | public byte* ptr;
15 |
16 | public Request(int size)
17 | {
18 | buffer = GC.AllocateArray(size, pinned: true);
19 | ptr = (byte*)Unsafe.AsPointer(ref buffer[0]);
20 | }
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Embedded/Request.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | namespace Embedded.server
5 | {
6 | public struct Request
7 | {
8 | public byte[] buffer;
9 | public unsafe byte* bufferPtr;
10 | }
11 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Geo/GeoHash.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using BenchmarkDotNet.Attributes;
5 |
6 | namespace BDN.benchmark.Geo
7 | {
8 | ///
9 | /// Benchmark for GeoHash
10 | ///
11 | [MemoryDiagnoser]
12 | public class GeoHash
13 | {
14 | private const double Latitude = 47.642219912251285;
15 | private const double Longitude = -122.14205560231471;
16 |
17 | private const long GeoHashInteger = 1557413161902764;
18 |
19 | [Benchmark]
20 | public long GeoToLongValue() => Garnet.server.GeoHash.GeoToLongValue(Latitude, Longitude);
21 |
22 | [Benchmark]
23 | public (double, double) GetCoordinatesFromLong() => Garnet.server.GeoHash.GetCoordinatesFromLong(GeoHashInteger);
24 |
25 | [Benchmark]
26 | public string GetGeoHashCode() => Garnet.server.GeoHash.GetGeoHashCode(GeoHashInteger);
27 | }
28 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Network/BasicOperations.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using BenchmarkDotNet.Attributes;
5 | using Embedded.server;
6 |
7 | namespace BDN.benchmark.Network
8 | {
9 | ///
10 | /// Benchmark for BasicOperations
11 | ///
12 | [MemoryDiagnoser]
13 | public class BasicOperations : NetworkBase
14 | {
15 | static ReadOnlySpan INLINE_PING => "PING\r\n"u8;
16 | Request ping;
17 |
18 | public override void GlobalSetup()
19 | {
20 | base.GlobalSetup();
21 | SetupOperation(ref ping, INLINE_PING);
22 | }
23 |
24 | [Benchmark]
25 | public async ValueTask InlinePing()
26 | {
27 | await Send(ping);
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Network/NetworkParams.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | namespace BDN.benchmark.Network
5 | {
6 | ///
7 | /// Network parameters
8 | ///
9 | public struct NetworkParams
10 | {
11 | ///
12 | /// Whether to use TLS
13 | ///
14 | public bool useTLS;
15 |
16 | ///
17 | /// Constructor
18 | ///
19 | public NetworkParams(bool useTLS)
20 | {
21 | this.useTLS = useTLS;
22 | }
23 |
24 | ///
25 | /// String representation
26 | ///
27 | public override string ToString()
28 | {
29 | if (!useTLS)
30 | return "None";
31 |
32 | var ret = "";
33 | if (useTLS)
34 | ret += "TLS";
35 | return ret;
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Operations/BasicOperations.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using BenchmarkDotNet.Attributes;
5 | using Embedded.server;
6 |
7 | namespace BDN.benchmark.Operations
8 | {
9 | ///
10 | /// Benchmark for BasicOperations
11 | ///
12 | [MemoryDiagnoser]
13 | public unsafe class BasicOperations : OperationsBase
14 | {
15 | static ReadOnlySpan INLINE_PING => "PING\r\n"u8;
16 | Request ping;
17 |
18 | public override void GlobalSetup()
19 | {
20 | base.GlobalSetup();
21 | SetupOperation(ref ping, INLINE_PING);
22 | }
23 |
24 | [Benchmark]
25 | public void InlinePing()
26 | {
27 | Send(ping);
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Operations/ObjectOperations.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using BenchmarkDotNet.Attributes;
5 | using Embedded.server;
6 |
7 | namespace BDN.benchmark.Operations
8 | {
9 | ///
10 | /// Benchmark for ObjectOperations
11 | ///
12 | [MemoryDiagnoser]
13 | public unsafe class ObjectOperations : OperationsBase
14 | {
15 | static ReadOnlySpan LPUSHPOP => "*3\r\n$5\r\nLPUSH\r\n$1\r\nd\r\n$1\r\ne\r\n*2\r\n$4\r\nLPOP\r\n$1\r\nd\r\n"u8;
16 | Request lPushPop;
17 |
18 | public override void GlobalSetup()
19 | {
20 | base.GlobalSetup();
21 |
22 | SetupOperation(ref lPushPop, LPUSHPOP);
23 |
24 | // Pre-populate data
25 | SlowConsumeMessage("*3\r\n$5\r\nLPUSH\r\n$1\r\nd\r\n$1\r\nf\r\n"u8);
26 | }
27 |
28 | [Benchmark]
29 | public void LPushPop()
30 | {
31 | Send(lPushPop);
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Operations/OperationParams.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | namespace BDN.benchmark.Operations
5 | {
6 | ///
7 | /// Operation parameters
8 | ///
9 | public struct OperationParams
10 | {
11 | ///
12 | /// Whether to use ACLs
13 | ///
14 | public bool useACLs;
15 |
16 | ///
17 | /// Whether to use AOF
18 | ///
19 | public bool useAof;
20 |
21 | ///
22 | /// Constructor
23 | ///
24 | public OperationParams(bool useACLs, bool useAof)
25 | {
26 | this.useACLs = useACLs;
27 | this.useAof = useAof;
28 | }
29 |
30 | ///
31 | /// String representation
32 | ///
33 | public override string ToString()
34 | {
35 | if (!useACLs && !useAof)
36 | return "None";
37 |
38 | var ret = "";
39 | if (useACLs)
40 | ret += "ACL";
41 | if (useAof)
42 | ret += (ret.Length > 0 ? "+" : "") + "AOF";
43 | return ret;
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | [assembly: InternalsVisibleTo("Garnet.fuzz" + AssemblyRef.GarnetPublicKey)]
--------------------------------------------------------------------------------
/benchmark/BDN.benchmark/Utils/BenchUtils.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using System.Text;
5 |
6 | namespace BDN.benchmark
7 | {
8 | public class BenchUtils
9 | {
10 | static readonly byte[] ascii_chars = Encoding.ASCII.GetBytes("abcdefghijklmnopqrstvuwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
11 | Random rnd;
12 |
13 | public BenchUtils()
14 | {
15 | rnd = new Random(674386);
16 | }
17 |
18 | public void RandomBytes(ref byte[] data, int startOffset = -1, int endOffset = -1)
19 | {
20 | startOffset = startOffset == -1 ? 0 : startOffset;
21 | endOffset = endOffset == -1 ? data.Length : endOffset;
22 | for (int i = startOffset; i < endOffset; i++)
23 | data[i] = ascii_chars[rnd.Next(ascii_chars.Length)];
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/benchmark/Resp.benchmark/ClientTypes.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | namespace Resp.benchmark
5 | {
6 | public enum ClientType : byte
7 | {
8 | LightClient,
9 | SERedis,
10 | GarnetClientSession,
11 | GarnetClient
12 | }
13 | }
--------------------------------------------------------------------------------
/benchmark/Resp.benchmark/OpType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | namespace Resp.benchmark
5 | {
6 | public enum OpType
7 | {
8 | NONE, MGET, INCR, MSET, SET, SETEX, GET, DEL, PING, PFADD, MPFADD, PFCOUNT, PFMERGE, ZADD, ZREM, ZADDREM, GEOADD, GEOADDREM, ZCARD, ZADDCARD,
9 | SETBIT, GETBIT, BITCOUNT, BITPOS, BITOP_AND, BITOP_OR, BITOP_XOR, BITOP_NOT,
10 | BITFIELD, BITFIELD_GET, BITFIELD_SET, BITFIELD_INCR,
11 | SETIFPM, MYDICTGET, MYDICTSET,
12 | DBSIZE,
13 | READ_TXN, WRITE_TXN, READWRITETX, WATCH_TXN, SAMPLEUPDATETX, SAMPLEDELETETX,
14 | SCRIPTSET, SCRIPTGET, SCRIPTRETKEY,
15 | PUBLISH, SPUBLISH,
16 | READONLY = 8888,
17 | AUTH = 9999,
18 | }
19 | }
--------------------------------------------------------------------------------
/benchmark/Resp.benchmark/Resp.benchmark.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml
6 | true
7 |
8 |
9 |
10 |
11 | PreserveNewest
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/charts/garnet/.gitignore:
--------------------------------------------------------------------------------
1 | charts/
2 |
--------------------------------------------------------------------------------
/charts/garnet/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *.orig
18 | *~
19 | # Various IDEs
20 | .project
21 | .idea/
22 | *.tmproj
23 | .vscode/
24 |
--------------------------------------------------------------------------------
/charts/garnet/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v2
2 | name: garnet
3 | description: A Helm chart for Microsoft Garnet
4 | type: application
5 | version: 0.2.2
6 | appVersion: Version.props
7 | home: https://github.com/microsoft/garnet
8 | icon: https://avatars.githubusercontent.com/u/6154722?s=200&v=4
9 |
10 | keywords:
11 | - scalable
12 | - key-value
13 | - cache
14 | - cluster
15 | - store
16 | - remote
17 | - persistent
18 | - concurrent
19 | - low-latency
20 | - cache-storage
21 | - hash-table
22 | - larger-the-memory
23 |
24 | sources:
25 | - https://github.com/microsoft/garnet.git
26 |
27 | maintainers: []
28 |
--------------------------------------------------------------------------------
/charts/garnet/README.md.gotmpl:
--------------------------------------------------------------------------------
1 | {{ template "chart.header" . }}
2 | {{ template "chart.deprecationWarning" . }}
3 |
4 | {{ template "chart.badgesSection" . }}
5 |
6 | {{ template "chart.description" . }}
7 |
8 | {{ template "chart.homepageLine" . }}
9 |
10 | {{ template "chart.maintainersSection" . }}
11 |
12 | {{ template "chart.sourcesSection" . }}
13 |
14 | ## Usage
15 |
16 | [Helm](https://helm.sh) must be installed to use the charts. Please refer to
17 | Helm's [documentation](https://helm.sh/docs) to get started.
18 |
19 | To install the Garnet chart (using an OCI-based registry):
20 |
21 | ```sh
22 | helm upgrade --install garnet oci://ghcr.io/microsoft/helm-charts/garnet
23 | ```
24 |
25 | To uninstall the chart:
26 |
27 | ```sh
28 | helm delete garnet
29 | ```
30 |
31 | {{ template "chart.requirementsSection" . }}
32 |
33 | {{ template "chart.valuesSection" . }}
34 |
35 | {{ template "helm-docs.versionFooter" . }}
36 |
--------------------------------------------------------------------------------
/charts/garnet/templates/secret.yaml:
--------------------------------------------------------------------------------
1 | {{- if and (eq .Values.config.existingSecret "") .Values.config.garnetConf }}
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: {{ include "garnet.fullname" . }}-config
6 | labels:
7 | {{- include "garnet.labels" . | nindent 4 }}
8 | type: Opaque
9 | data:
10 | garnet.conf: {{ .Values.config.garnetConf | b64enc | quote }}
11 | {{- end }}
12 |
--------------------------------------------------------------------------------
/charts/garnet/templates/service-headless.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ include "garnet.fullname" . }}-headless
5 | labels:
6 | {{- include "garnet.labels" . | nindent 4 }}
7 | {{- with .Values.service.annotations }}
8 | annotations:
9 | {{- toYaml . | nindent 4 }}
10 | {{- end }}
11 | spec:
12 | clusterIP: None
13 | ports:
14 | - port: {{ .Values.service.port }}
15 | targetPort: {{ .Values.containers.port }}
16 | protocol: TCP
17 | name: garnet
18 | selector:
19 | {{- include "garnet.selectorLabels" . | nindent 4 }}
20 |
--------------------------------------------------------------------------------
/charts/garnet/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ include "garnet.fullname" . }}
5 | labels:
6 | {{- include "garnet.labels" . | nindent 4 }}
7 | {{- with .Values.service.annotations }}
8 | annotations:
9 | {{- toYaml . | nindent 4 }}
10 | {{- end }}
11 | spec:
12 | type: {{ .Values.service.type }}
13 | ports:
14 | - port: {{ .Values.service.port }}
15 | targetPort: {{ .Values.containers.port }}
16 | protocol: TCP
17 | name: garnet
18 | selector:
19 | {{- include "garnet.selectorLabels" . | nindent 4 }}
20 |
--------------------------------------------------------------------------------
/charts/garnet/templates/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.serviceAccount.create -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: {{ include "garnet.serviceAccountName" . }}
6 | labels:
7 | {{- include "garnet.labels" . | nindent 4 }}
8 | {{- with .Values.serviceAccount.annotations }}
9 | annotations:
10 | {{- toYaml . | nindent 4 }}
11 | {{- end }}
12 | {{- if and .Values.serviceAccount.token (semverCompare ">=1.24-0" .Capabilities.KubeVersion.GitVersion) }}
13 | secrets:
14 | - name: {{ include "garnet.serviceAccountName" . }}-token
15 | {{- end }}
16 | {{- end }}
17 |
--------------------------------------------------------------------------------
/charts/garnet/templates/token.yaml:
--------------------------------------------------------------------------------
1 | {{- if and .Values.serviceAccount.create .Values.serviceAccount.token (semverCompare ">=1.24-0" .Capabilities.KubeVersion.GitVersion) -}}
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: {{ include "garnet.serviceAccountName" . }}-token
6 | labels:
7 | {{- include "garnet.labels" . | nindent 4 }}
8 | annotations:
9 | kubernetes.io/service-account.name: {{ include "garnet.serviceAccountName" . }}
10 | {{- with .Values.serviceAccount.annotations }}
11 | {{- toYaml . | nindent 4 }}
12 | {{- end }}
13 | type: kubernetes.io/service-account-token
14 | {{- end }}
15 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | garnet:
3 | image: 'ghcr.io/microsoft/garnet'
4 | ulimits:
5 | memlock: -1
6 | ports:
7 | - "6379:6379"
8 | # To avoid docker NAT, consider `host` mode.
9 | # https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode
10 | # network_mode: "host"
11 | volumes:
12 | - garnetdata:/data
13 | volumes:
14 | garnetdata:
15 |
--------------------------------------------------------------------------------
/hosting/Windows/Garnet.worker/Garnet.worker.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0;net9.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/hosting/Windows/Garnet.worker/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using Garnet;
5 | using Microsoft.Extensions.DependencyInjection;
6 | using Microsoft.Extensions.Hosting;
7 |
8 | class Program
9 | {
10 | static void Main(string[] args)
11 | {
12 | var builder = Host.CreateApplicationBuilder(args);
13 | builder.Services.AddHostedService(_ => new Worker(args));
14 |
15 | builder.Services.AddWindowsService(options =>
16 | {
17 | options.ServiceName = "Microsoft Garnet Server";
18 | });
19 |
20 | var host = builder.Build();
21 | host.Run();
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/client/ClientSession/GarnetClientSessionTcpNetworkHandler.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using System.Net.Sockets;
5 | using Garnet.common;
6 | using Garnet.networking;
7 | using Microsoft.Extensions.Logging;
8 |
9 | namespace Garnet.client
10 | {
11 | sealed class GarnetClientSessionTcpNetworkHandler : TcpNetworkHandlerBase
12 | {
13 | public GarnetClientSessionTcpNetworkHandler(GarnetClientSession serverHook, Socket socket, NetworkBufferSettings networkBufferSettings, LimitedFixedBufferPool networkPool, bool useTLS, IMessageConsumer messageConsumer, int networkSendThrottleMax = 8, ILogger logger = null)
14 | : base(serverHook, new GarnetTcpNetworkSender(socket, networkBufferSettings, networkPool, networkSendThrottleMax), socket, networkBufferSettings, networkPool, useTLS, messageConsumer: messageConsumer, logger: logger)
15 | {
16 | }
17 |
18 | public byte[] RawTransportBuffer => transportReceiveBuffer;
19 | }
20 | }
--------------------------------------------------------------------------------
/libs/client/ExceptionTypes.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using System;
5 |
6 | namespace Garnet.client
7 | {
8 | ///
9 | /// GarnetClient disposed exception
10 | ///
11 | public sealed class GarnetClientDisposedException : ObjectDisposedException
12 | {
13 | internal GarnetClientDisposedException() : base("GarnetClient")
14 | {
15 | }
16 | }
17 |
18 | ///
19 | /// GarnetClient timeout exception
20 | ///
21 | public sealed class GarnetClientTimeoutException : TimeoutException
22 | {
23 | internal GarnetClientTimeoutException() : base("GarnetClient")
24 | {
25 | }
26 | }
27 |
28 | ///
29 | /// GarnetClient socket disposed exception
30 | ///
31 | public sealed class GarnetClientSocketDisposedException : ObjectDisposedException
32 | {
33 | internal GarnetClientSocketDisposedException() : base("GarnetClient Socket")
34 | {
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/libs/client/Garnet.client.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | ../../Garnet.snk
6 | false
7 | true
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/libs/client/GarnetClientTcpNetworkHandler.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT license.
3 |
4 | using System;
5 | using System.Net.Sockets;
6 | using Garnet.common;
7 | using Garnet.networking;
8 | using Microsoft.Extensions.Logging;
9 |
10 | namespace Garnet.client
11 | {
12 | sealed class GarnetClientTcpNetworkHandler : TcpNetworkHandlerBase
13 | {
14 | public GarnetClientTcpNetworkHandler(GarnetClient serverHook, Action