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

Compaction Hidden Set RAII Drop Guard #87

Open
marvin-j97 opened this issue Dec 4, 2024 · 1 comment
Open

Compaction Hidden Set RAII Drop Guard #87

marvin-j97 opened this issue Dec 4, 2024 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed refactor test

Comments

@marvin-j97
Copy link
Contributor

marvin-j97 commented Dec 4, 2024

Something like:

let _hidden = HiddenGuard::new(&levels, &to_compact);
HiddenGuard::drop() {
  let lock = self.levels.lock();
  lock.show_segments(self.ids);
}

That way, the drop guard shows hidden segments when an error is thrown with ?, currently it's error prone.

Considerations

Need to make sure, it cannot deadlock.

@marvin-j97 marvin-j97 added good first issue Good for newcomers help wanted Extra attention is needed refactor test labels Dec 4, 2024
@marvin-j97 marvin-j97 changed the title Compaction Hidden Set Drop Guard Compaction Hidden Set RAII Drop Guard Dec 7, 2024
@marvin-j97
Copy link
Contributor Author

This does not easily work because the hidden guard would write lock the already-locked level manifest on drop.
This needs to be reworked differently somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed refactor test
Projects
None yet
Development

No branches or pull requests

1 participant