Skip to content
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

fix: proper memory accounting for objects loaded via streaming #4774

Merged
merged 1 commit into from
Mar 16, 2025
Merged

Conversation

romange
Copy link
Collaborator

@romange romange commented Mar 15, 2025

The bug: during the loading when appending to the existing object, ItAndUpdater scope did not account for the appended data, and as a result object_used_memory and its variation did not account for streamed objects.

The fix: to extend the scope of the ItAndUpdater object to cover appends. Added a sanity DCHECK that ensures that object_used_memory is at least as the memory used by a single object. This dcheck fails pre-fix.

Fixes #4773

@romange romange requested a review from adiholden March 15, 2025 20:47
The bug: during the loading when appending to the existing object,
ItAndUpdater scope did not account for the appended data, and as a result
`object_used_memory` and its variation did not account for streamed objects.

The fix: to extend the scope of the ItAndUpdater object to cover appends.
Added a sanity DCHECK that ensures that object_used_memory is at least as the memory used
by a single object. This dcheck fails pre-fix.

Fixes #4773

Signed-off-by: Roman Gershman <[email protected]>
@romange romange merged commit 753c25e into main Mar 16, 2025
10 checks passed
@romange romange deleted the Fix4773 branch March 16, 2025 10:03
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.

object_used_memory and memory type counters overflow
2 participants