Skip to content

Conversation

@prestwich
Copy link
Member

@prestwich prestwich commented Jan 13, 2026

One day's work on re-architecting reth DB with a hot/cold model

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@prestwich prestwich marked this pull request as ready for review January 13, 2026 21:23
@prestwich prestwich requested a review from a team as a code owner January 13, 2026 21:23
@prestwich prestwich force-pushed the prestwich/storage-api branch from 7152b93 to 67c6c16 Compare January 14, 2026 16:55
if self.write_locked.swap(true, Ordering::AcqRel) {
return Err(HotKvError::WriteLocked);
}
self.inner.writer().map(Some).map(|tx| WriteGuard { tx, db: self })
Copy link
Member

Choose a reason for hiding this comment

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

If this fails, no WriteGuard is created, which is the only way self.write_locked is set back to false. Won't this mean an error when calling writer will erroneously lock writes forever?

@prestwich
Copy link
Member Author

don't review this PR yet

@prestwich prestwich marked this pull request as draft January 15, 2026 13:02
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.

3 participants