Repository: microsoft/garnet
File: libs/server/Servers/GarnetServerOptions.cs (C#)

Code before:
        public long FullCheckpointLogInterval = 1L << 30;

        /// <summary>
        /// SAVE and BGSAVE: Limit on size of delta log for incremental snapshot, we perform a non-incremental checkpoint after this limit is reached.
        /// </summary>
        public long IncrementalSnapshotLogSizeLimit = 1L << 30;

        /// <summary>
        /// SAVE and BGSAVE: Use fold-over checkpoints instead of snapshots.
        /// </summary>
        public bool UseFoldOverCheckpoints = false;

        /// <summary>
        /// Minimum worker and completion port threads in thread pool (0 for default)
        /// </summary>
        public int ThreadPoolMinThreads = 0;

        /// <summary>
        /// Maximum worker and completion port threads in thread pool (0 for default)
        /// </summary>
        public int ThreadPoolMaxThreads = 0;

        /// <summary>
        /// Maximum client connection limit
        /// </summary>
        public int ConnectionLimit = 0;

        /// <summary>
        /// Creator of device factories
        /// </summary>
        public Func<INamedDeviceFactory> DeviceFactoryCreator = null;

        /// <summary>
        /// Whether and by how much should we throttle the disk IO for checkpoints (default = 0)
        /// -1   - disable throttling
        /// >= 0 - run checkpoint flush in separate task, sleep for specified time after each WRiteAsync
        /// </summary>
        public int CheckpointThrottleFlushDelayMs = 0;

        /// <summary>
        /// Enable FastCommit mode for TsavoriteLog
        /// </summary>
        public bool EnableFastCommit = true;

        /// <summary>
        /// Throttle FastCommit to write metadata once every K commits
        /// </summary>
        public int FastCommitThrottleFreq = 1000;

        /// <summary>
        /// Throttle the maximum outstanding network sends per session

Review comment (suggestion):
We should let `0` denote "no connections allowed" which might be useful if for some reason people want to run the server without allowing any network connections. `-1` or `int.MaxValue` can be the default to allow unlimited connections.

Code after:
        public long FullCheckpointLogInterval = 1L << 30;

        /// <summary>
        /// SAVE and BGSAVE: Limit on size of delta log for incremental snapshot, we perform a non-incremental checkpoint after this limit is reached.
        /// </summary>
        public long IncrementalSnapshotLogSizeLimit = 1L << 30;

        /// <summary>
        /// SAVE and BGSAVE: Use fold-over checkpoints instead of snapshots.
        /// </summary>
        public bool UseFoldOverCheckpoints = false;

        /// <summary>
        /// Minimum worker and completion port threads in thread pool (0 for default)
        /// </summary>
        public int ThreadPoolMinThreads = 0;

        /// <summary>
        /// Maximum worker and completion port threads in thread pool (0 for default)
        /// </summary>
        public int ThreadPoolMaxThreads = 0;

        /// <summary>
        /// Maximum client connection limit
        /// </summary>
        public int NetworkConnectionLimit = -1;

        /// <summary>
        /// Creator of device factories
        /// </summary>
        public Func<INamedDeviceFactory> DeviceFactoryCreator = null;

        /// <summary>
        /// Whether and by how much should we throttle the disk IO for checkpoints (default = 0)
        /// -1   - disable throttling
        /// >= 0 - run checkpoint flush in separate task, sleep for specified time after each WRiteAsync
        /// </summary>
        public int CheckpointThrottleFlushDelayMs = 0;

        /// <summary>
        /// Enable FastCommit mode for TsavoriteLog
        /// </summary>
        public bool EnableFastCommit = true;

        /// <summary>
        /// Throttle FastCommit to write metadata once every K commits
        /// </summary>
        public int FastCommitThrottleFreq = 1000;

        /// <summary>
        /// Throttle the maximum outstanding network sends per session