From 4fa2ef41aa35a011c4294f6cfec26945a34e723d Mon Sep 17 00:00:00 2001 From: yusing Date: Wed, 21 Jan 2026 23:44:56 +0800 Subject: [PATCH] feat(pool): introduce tombstone-based deletion with soft-delete mechanism Refactored the pool implementation to use a tombstone-based deletion strategy instead of immediate removal. This allows correct logging "reload" instead of "removed" + "added" when an item is quickly deleted and re-added within a short time window. Changes: - Items are now marked as tombstones upon deletion and retained for 1 second - Added `PurgeExpiredTombs()` method for cleanup of expired tombstones - Updated `Get`, `Iter`, and `Slice` to skip tombstoned entries - Updated `Del` and `DelKey` to cleanup tombstones when exceeding threshold - `AddIfNotExists` can now "reload" recently deleted items within the TTL - Added tomb counter for tracking active tombstones and triggering purge --- goutils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goutils b/goutils index 92af8e08..bc9e96eb 160000 --- a/goutils +++ b/goutils @@ -1 +1 @@ -Subproject commit 92af8e08661248960f0838e8717dc400e6a0745a +Subproject commit bc9e96ebf387ae954638f73ac7309d464cc207f9