Skip to content

[MOD-5935] Log DocTable capacity growth for memory diagnostics#6620

Merged
lerman25 merged 3 commits intomasterfrom
omerl-doctable-fix
Aug 12, 2025
Merged

[MOD-5935] Log DocTable capacity growth for memory diagnostics#6620
lerman25 merged 3 commits intomasterfrom
omerl-doctable-fix

Conversation

@lerman25
Copy link
Copy Markdown
Collaborator

@lerman25 lerman25 commented Aug 11, 2025

Added a notice log in DocTable to record capacity increases:
This is meant to help diagnose a specific customer case where a small number of documents combined with a high volume of updates causes the DocTable size to grow disproportionately to the actual data stored (like in MOD-5935). The log will help confirm whether excessive capacity growth is contributing to the observed memory usage.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.45%. Comparing base (946e552) to head (1a40895).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6620      +/-   ##
==========================================
- Coverage   87.47%   87.45%   -0.03%     
==========================================
  Files         282      282              
  Lines       44842    44843       +1     
  Branches     7747     7747              
==========================================
- Hits        39226    39216      -10     
- Misses       5498     5509      +11     
  Partials      118      118              
Flag Coverage Δ
flow 84.49% <100.00%> (-0.15%) ⬇️
unit 49.24% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +136 to +139
// Log DocTable capacity growth to help diagnose cases where a small number of documents
// combined with frequent updates cause disproportionate memory usage.
// This allows us to confirm if unexpected memory spikes are due to capacity increases.
RedisModule_Log(RSDummyContext, "notice", "DocTable capacity increase from %zu to %zu", oldcap, t->cap);
Copy link
Copy Markdown
Collaborator

@alonre24 alonre24 Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice
I would just add a comment about the reason WHY we are not shrinking (avoiding rehashing..), and refer to the relevant config if we do want to shrink

@lerman25 lerman25 added this pull request to the merge queue Aug 12, 2025
Merged via the queue into master with commit 6d97411 Aug 12, 2025
17 checks passed
@lerman25 lerman25 deleted the omerl-doctable-fix branch August 12, 2025 15:41
@redisearch-backport-pull-request
Copy link
Copy Markdown
Contributor

Successfully created backport PR for 2.8:

@redisearch-backport-pull-request
Copy link
Copy Markdown
Contributor

Successfully created backport PR for 2.6:

@redisearch-backport-pull-request
Copy link
Copy Markdown
Contributor

Successfully created backport PR for 2.10:

@redisearch-backport-pull-request
Copy link
Copy Markdown
Contributor

Successfully created backport PR for 8.2:

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants