Skip to content

fix(json_family): Fix memory tracking for JSON mutate operations. FOURTH PR #5070

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BagritsevichStepan
Copy link
Contributor

This is fourth PR that fixes memory tracking issues in JSON.

Bugs that were found and fixed:

  1. Bug in JsonMutateOperation, where we called op_args.shard->search_indices()->RemoveDoc after starting the memory tracking. RemoveDoc has a static cache that may allocate some memory, but this memory does not belong to the JSON object itself. As a result, memory usage will be overestimated in this case.

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
@BagritsevichStepan BagritsevichStepan force-pushed the memory/fix-memory-tracking-for-mutate-json-operations branch from 91ef2af to 9e81535 Compare May 7, 2025 08:03
@romange
Copy link
Collaborator

romange commented May 7, 2025

I do not see any test changes in this PR. Does this PR removes completely JsonMemTracker?

@BagritsevichStepan
Copy link
Contributor Author

I can try to reproduce the bug in the tests

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.

2 participants