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/repostore deletes for non-orphan blocks #1109

Merged
merged 8 commits into from
Feb 14, 2025
Merged

Conversation

gmega
Copy link
Member

@gmega gmega commented Feb 11, 2025

Fixes #1108

This PR:

  • fixes the broken deletes for non-orphan blocks (i.e., blocks that are part of a dataset);
  • makes deleteBlock more strict by actually returning an error on illegal deletes instead of failing silently;
  • adds additional tests to cover the peculiar aspects of deletes for non-orphan blocks.

@gmega gmega requested a review from dryajov February 11, 2025 19:02
@gmega gmega requested a review from munna0908 February 12, 2025 12:00
@gmega gmega requested a review from dryajov February 12, 2025 17:33
@gmega
Copy link
Member Author

gmega commented Feb 13, 2025

@munna0908 ping :-)

@munna0908
Copy link
Contributor

@gmega LGTM 🚀

@gmega gmega enabled auto-merge February 14, 2025 12:05
@gmega gmega added this pull request to the merge queue Feb 14, 2025
proc example*(_: type bt.Block): bt.Block =
let length = rand(4096)
proc example*(_: type bt.Block, size: int = 4096): bt.Block =
let length = rand(size)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shit... what had I smoked here....

Merged via the queue into master with commit 25c84f4 Feb 14, 2025
19 checks passed
@gmega gmega deleted the fix/repostore-deletes branch February 14, 2025 14:50
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.

Block refcounts underflow when a non-orphan block is deleted, re-inserted, and then deleted again
3 participants