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

781 fix cleaner overflow #786

Merged
merged 3 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bob versions changelog
- Fix incorrect exist result due to variables sharing between keys (#762)
- Fix unit of measurement of memory in hardware metrics (#772)
- Fix rust deprecation warning (#779)
- Fix subtraction overflow in cleaner (#781)

#### Updated
- Logger to logstash updated to qoollo-log4rs-logstash v0.2 (#681)
Expand Down
2 changes: 1 addition & 1 deletion bob/src/cleaner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async fn index_cleanup_by_memory_limit(backend: &Arc<Backend>, limit: usize) {
let mut memory = baseline_memory;
while memory > limit {
if let Some(freed) = backend.close_oldest_active_blob().await {
memory = memory - freed;
memory = memory.saturating_sub(freed);
debug!("closed index for active blob, freeing {:?} bytes", freed);
} else {
break;
Expand Down