-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mon/MonitorDBStore: improve get_chunk_tx limits
The old version was horribly inefficient in that it would reencode the transaction on every iteration. Instead, estimate the size if we add an item and stop it if looks like it will go over. This isn't super precise, but it's close enough, since the limits are approximate. Drop the single-use helper since it only makes the code harder to follow. Signed-off-by: Sage Weil <sage@redhat.com> (cherry picked from commit 83b2ada)
- Loading branch information
Showing
1 changed file
with
18 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters