Skip to content

hash: pause auto-shrink during HGETDEL#3535

Open
charsyam wants to merge 1 commit intovalkey-io:unstablefrom
charsyam:fix/hgetdel-pause-autoshrink-from-unstable
Open

hash: pause auto-shrink during HGETDEL#3535
charsyam wants to merge 1 commit intovalkey-io:unstablefrom
charsyam:fix/hgetdel-pause-autoshrink-from-unstable

Conversation

@charsyam
Copy link
Copy Markdown
Contributor

Match HGETDEL with the existing batch-delete pattern used by HDEL.

HDEL already pauses hashtable auto-shrink while deleting multiple fields so shrink evaluation is deferred until the batch completes. HGETDEL was missing the same optimization even though it also deletes fields in a loop.

Pause auto-shrink for hashtable-encoded hashes before the HGETDEL delete loop and resume it once afterwards. This preserves observable behavior and reduces redundant shrink work for multi-field deletes.

Match HGETDEL with the existing batch-delete pattern used by HDEL.

HDEL already pauses hashtable auto-shrink while deleting multiple
fields so shrink evaluation is deferred until the batch completes.
HGETDEL was missing the same optimization even though it also deletes
fields in a loop.

Pause auto-shrink for hashtable-encoded hashes before the HGETDEL
delete loop and resume it once afterwards. This preserves observable
behavior and reduces redundant shrink work for multi-field deletes.

Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.46%. Comparing base (4a42c95) to head (7d82364).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3535      +/-   ##
============================================
+ Coverage     76.40%   76.46%   +0.06%     
============================================
  Files           159      159              
  Lines         79851    79853       +2     
============================================
+ Hits          61008    61062      +54     
+ Misses        18843    18791      -52     
Files with missing lines Coverage Δ
src/t_hash.c 95.40% <100.00%> (+<0.01%) ⬆️

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant