Skip to content

Commit 490b055

Browse files
authored
Added support to expire specfic member of a sorted set (#1000)
* Added support to expire specfic member of a sorted set by adding family of commands * Removed temp file * Added test cases * Format fix * Fixed formating * Fixed review commands * Fixed test case failure * Fixed slot test case * Fixed review commands * Fixed review comments * Format fix * Review comment fix * Review comment fix for reusing parseState * Fixed issue after pulling latest * Fixed custom proc * PR review comment fix * Fixed review comments * close lock for hcollect as well
1 parent 5e53f12 commit 490b055

36 files changed

+5408
-137
lines changed

libs/host/Configuration/Options.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,10 @@ internal sealed class Options
237237
[IntRangeValidation(0, int.MaxValue)]
238238
[Option("compaction-freq", Required = false, HelpText = "Background hybrid log compaction frequency in seconds. 0 = disabled (compaction performed before checkpointing instead)")]
239239
public int CompactionFrequencySecs { get; set; }
240+
240241
[IntRangeValidation(0, int.MaxValue)]
241-
[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.")]
242-
public int HashCollectFrequencySecs { get; set; }
242+
[Option("expired-object-collection-freq", Required = false, HelpText = "Frequency in seconds for the background task to perform object collection which removes expired members within object from memory. 0 = disabled. Use the HCOLLECT and ZCOLLECT API to collect on-demand.")]
243+
public int ExpiredObjectCollectionFrequencySecs { get; set; }
243244

244245
[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)")]
245246
public LogCompactionType CompactionType { get; set; }
@@ -766,7 +767,7 @@ public GarnetServerOptions GetServerOptions(ILogger logger = null)
766767
WaitForCommit = WaitForCommit.GetValueOrDefault(),
767768
AofSizeLimit = AofSizeLimit,
768769
CompactionFrequencySecs = CompactionFrequencySecs,
769-
HashCollectFrequencySecs = HashCollectFrequencySecs,
770+
ExpiredObjectCollectionFrequencySecs = ExpiredObjectCollectionFrequencySecs,
770771
CompactionType = CompactionType,
771772
CompactionForceDelete = CompactionForceDelete.GetValueOrDefault(),
772773
CompactionMaxSegments = CompactionMaxSegments,

libs/host/defaults.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@
162162
/* Background hybrid log compaction frequency in seconds. 0 = disabled (compaction performed before checkpointing instead) */
163163
"CompactionFrequencySecs" : 0,
164164

165-
/* 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. */
166-
"HashCollectFrequencySecs" : 0,
165+
/* Frequency in seconds for the background task to perform object collection which removes expired members within object from memory. 0 = disabled. Use the HCOLLECT and ZCOLLECT API to collect on-demand. */
166+
"ExpiredObjectCollectionFrequencySecs" : 0,
167167

168168
/* Hybrid log compaction type. Value options: */
169169
/* None - no compaction */

0 commit comments

Comments
 (0)