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 wrong size calculation if a block could not be removed #371

Merged
merged 2 commits into from Oct 29, 2023

Conversation

atimin
Copy link
Member

@atimin atimin commented Oct 29, 2023

Closes #

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

When the storage engine tries to keep a FIFO quota it removes the oldest block in a bucket. If the block has a reader or writer, it causes an error and the engine tries to remove the last block in another entry. However, it reduces the size of the entry anyway and the bucket has more data than the quota.

What is the new behavior?

Now the Entry class changes the size only if the remove operation was successful.

Does this PR introduce a breaking change?

No

Other information:

@atimin atimin merged commit c81e22a into stable Oct 29, 2023
14 checks passed
@atimin atimin deleted the fix-wrong-size-in-quota branch October 29, 2023 10:21
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.

None yet

1 participant