Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to expire specfic member of a sorted set #1000

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions libs/host/Configuration/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ internal sealed class Options
[Option("hcollect-freq", Required = false, HelpText = "Frequency in seconds for the background task to perform Hash collection. 0 = disabled. Hash collect is used to delete expired fields from hash without waiting for a write operation. Use the HCOLLECT API to collect on-demand.")]
public int HashCollectFrequencySecs { get; set; }

[IntRangeValidation(0, int.MaxValue)]
[Option("zcollect-freq", Required = false, HelpText = "Frequency in seconds for the background task to perform Sorted Set collection. 0 = disabled. Sorted Set collect is used to delete expired members from Sorted Set without waiting for a write operation. Use the ZCOLLECT API to collect on-demand.")]
public int SortedSetCollectFrequencySecs { get; set; }

[Option("compaction-type", Required = false, HelpText = "Hybrid log compaction type. Value options: None - no compaction, Shift - shift begin address without compaction (data loss), Scan - scan old pages and move live records to tail (no data loss), Lookup - lookup each record in compaction range, for record liveness checking using hash chain (no data loss)")]
public LogCompactionType CompactionType { get; set; }

Expand Down Expand Up @@ -714,6 +718,7 @@ public GarnetServerOptions GetServerOptions(ILogger logger = null)
AofSizeLimit = AofSizeLimit,
CompactionFrequencySecs = CompactionFrequencySecs,
HashCollectFrequencySecs = HashCollectFrequencySecs,
SortedSetCollectFrequencySecs = SortedSetCollectFrequencySecs,
CompactionType = CompactionType,
CompactionForceDelete = CompactionForceDelete.GetValueOrDefault(),
CompactionMaxSegments = CompactionMaxSegments,
Expand Down
3 changes: 3 additions & 0 deletions libs/host/defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
/* Frequency in seconds for the background task to perform Hash collection. 0 = disabled. Hash collect is used to delete expired fields from hash without waiting for a write operation. Use the HCOLLECT API to collect on-demand. */
"HashCollectFrequencySecs" : 0,

/* Frequency in seconds for the background task to perform Sorted Set collection. 0 = disabled. Sorted Set collect is used to delete expired members from Sorted Set without waiting for a write operation. Use the HCOLLECT API to collect on-demand. */
"SortedSetCollectFrequencySecs" : 0,

/* Hybrid log compaction type. Value options: */
/* None - no compaction */
/* Shift - shift begin address without compaction (data loss) */
Expand Down
Loading
Loading