Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Garnet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ETag", "samples\ETag\ETag.c
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Garnet.fuzz", "test\Garnet.fuzz\Garnet.fuzz.csproj", "{7A42F7AA-EE93-49B1-8711-A1D6D948F5FC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Btree", "playground\BTree\Btree.csproj", "{CE12831B-2805-469E-8208-759DC4B4862C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Device.benchmark", "benchmark\Device.benchmark\Device.benchmark.csproj", "{5422F66F-327C-AABE-98B2-9AFC349745D0}"
EndProject
Global
Expand Down Expand Up @@ -360,6 +362,14 @@ Global
{7A42F7AA-EE93-49B1-8711-A1D6D948F5FC}.Release|Any CPU.Build.0 = Release|Any CPU
{7A42F7AA-EE93-49B1-8711-A1D6D948F5FC}.Release|x64.ActiveCfg = Release|Any CPU
{7A42F7AA-EE93-49B1-8711-A1D6D948F5FC}.Release|x64.Build.0 = Release|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Debug|x64.ActiveCfg = Debug|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Debug|x64.Build.0 = Debug|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Release|Any CPU.Build.0 = Release|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Release|x64.ActiveCfg = Release|Any CPU
{CE12831B-2805-469E-8208-759DC4B4862C}.Release|x64.Build.0 = Release|Any CPU
{5422F66F-327C-AABE-98B2-9AFC349745D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5422F66F-327C-AABE-98B2-9AFC349745D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5422F66F-327C-AABE-98B2-9AFC349745D0}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -406,6 +416,7 @@ Global
{4FBA1587-BAFC-49F8-803A-D1CF431A26F5} = {7068BB97-1958-4060-B5F1-859464592E56}
{7A42F7AA-EE93-49B1-8711-A1D6D948F5FC} = {9A03717A-4E0B-49CA-8579-A02A4C1D003F}
{5422F66F-327C-AABE-98B2-9AFC349745D0} = {346A5A53-51E4-4A75-B7E6-491D950382CE}
{CE12831B-2805-469E-8208-759DC4B4862C} = {69A71E2C-00E3-42F3-854E-BE157A24834E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2C02C405-4798-41CA-AF98-61EDFEF6772E}
Expand Down
10 changes: 10 additions & 0 deletions libs/common/RespReadUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,16 @@ public static bool TryReadInt64WithLengthHeader(out long number, ref byte* ptr,
return true;
}

/// <summary>
/// Tries to read a Ulong from the given ASCII-encoded RESP string.
/// Note: this does not check for any length headers and is simply an accessor to TryReadUlong.
/// </summary>
/// <param name="number">If parsing was successful, contains the parsed ulong value.</param>
/// <param name="ptr">The starting position in the RESP string. Will be advanced if parsing is successful.</param>
/// <param name="end">The current end of the RESP string.</param>
/// <returns>True if a ulong was successfully parsed.</returns>
public static bool ReadUlong(out ulong number, ref byte* ptr, byte* end) => TryReadUInt64(ref ptr, end, out number, out _);

/// <summary>
/// Read long with length header
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions libs/host/Configuration/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,10 @@ public IEnumerable<string> LuaAllowedFunctions
[Option("expired-key-deletion-scan-freq", Required = false, HelpText = "Frequency of background scan for expired key deletion, in seconds")]
public int ExpiredKeyDeletionScanFrequencySecs { get; set; }

[OptionValidation]
[Option("streams", Required = false, HelpText = "Enable streams on server.")]
public bool? EnableStreams { get; set; }

[IntRangeValidation(0, int.MaxValue, includeMin: true, isRequired: false)]
[Option("cluster-replication-reestablishment-timeout")]
public int ClusterReplicationReestablishmentTimeout { get; set; }
Expand Down Expand Up @@ -950,6 +954,7 @@ public GarnetServerOptions GetServerOptions(ILogger logger = null)
UnixSocketPermission = unixSocketPermissions,
MaxDatabases = MaxDatabases,
ExpiredKeyDeletionScanFrequencySecs = ExpiredKeyDeletionScanFrequencySecs,
EnableStreams = EnableStreams.GetValueOrDefault(),
ClusterReplicationReestablishmentTimeout = ClusterReplicationReestablishmentTimeout,
ClusterReplicaResumeWithData = ClusterReplicaResumeWithData,
};
Expand Down
3 changes: 3 additions & 0 deletions libs/host/defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@
/* Max number of logical databases allowed in a single Garnet server instance */
"MaxDatabases": 16,

/* Enable use of streams inside Garnet */
"EnableStreams": false,

/* Frequency of background scan for expired key deletion, in seconds */
"ExpiredKeyDeletionScanFrequencySecs": -1,

Expand Down
Loading
Loading