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

Check refcount in reopen dirty seg #12207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mh0lt
Copy link
Contributor

@mh0lt mh0lt commented Oct 3, 2024

This fixes a race condition when merging dirty segs.

If the refcount is > 0 we should not remove the seg immediately because there is a visible segment holding a reference.

This will get tidied-up when the last visible segment closes and the file is removed.

This condition happens in a destructive way after a merge. In this case any new visible segments will be given the newly merged file so will not hold references to this file.

I've tested this by running amoy to the chain tip and leaving it running and previous crashes seem to have been tidied up.

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.

1 participant