Skip to content

Conversation

@coolreader18
Copy link
Collaborator

Description of Changes

Followup to #2504. Not sure why I didn't have this as part of that, I think I thought it would take a while to write this.

Expected complexity level and risk

n/a

Testing

  • yes

Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me! I'd also like someday to have a test that's fully integrated with the database as a whole, but I don't consider that high-prio.

@joshua-spacetime
Copy link
Collaborator

I do think we should add a higher-level integration test here. At the very least we should have a test that checks the segments since the last snapshot and makes sure they are not compressed. In the absence of a test like this, I would argue that we need a benchmark for replaying from the latest snapshot, since we care about the performance here.

@coolreader18
Copy link
Collaborator Author

Do you have any suggestions for how to go about that? RelationalDb doesn't really expose that kind of low level stuff.

@kim
Copy link
Contributor

kim commented Apr 1, 2025

Do you have any suggestions

Maybe just use the datastore directly, like the cutlery does?

@bfops bfops added the release-any To be landed in any release window label Apr 7, 2025
@coolreader18
Copy link
Collaborator Author

I do think we should add a higher-level integration test here. At the very least we should have a test that checks the segments since the last snapshot and makes sure they are not compressed. In the absence of a test like this, I would argue that we need a benchmark for replaying from the latest snapshot, since we care about the performance here.

I've been trying, and I really can't figure out a good way to write this test without just exposing a ton of internals from RelationalDb or the datastore, like literally adding a getter for a RwLockWriteGuard<'_, repo::Fs>. I do think that the benchmark makes the most sense, since that's really what this is a proxy for.

@coolreader18 coolreader18 added this pull request to the merge queue Apr 8, 2025
Merged via the queue into master with commit 2f6660e Apr 8, 2025
16 checks passed
@coolreader18 coolreader18 deleted the noa/commitlog-compression-tests branch April 9, 2025 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants