-
Notifications
You must be signed in to change notification settings - Fork 455
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
test/persist: add test that compaction is happening as expected #10541
Conversation
Touches MaterializeInc#10533 This commit adds a smoke test to check that persisted tables are being compacted as they should be, using metrics for the number of batches in a persistent trace to assert that the number decreases as expected. This test is a little bit brittle, as it is very coupled to the way trace compaction works today. A better alternative would be some kind of system table that can automatically return details like the since frontier or the number of trace batches. That is left as a followup.
2614946
to
0d4a8fa
Compare
verified that this fails without the fix for #10533 Hopefully, this test can help us prevent future regressions! |
I think the test looks fine, but yes, it's also closely tied to how compaction works today. Could we maybe just do a lot of inserts, then , then verify that the blob count is below some reasonable threshold? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! Lets see if there is any flakiness introduced and we will reevaluate.
We can actually do better than passively waiting for flakiness
running this now to see if we observe any failures over 200 runs. will merge if thats green! |
I thought about this and felt like it was non-trivial to write a test that would not give either a large percentage of false negatives (flakes) or false positives (fail to see a regression). When you send a large number of inserts its a bit opaque how many trace batches will get produced and its similarly opaque when those trace batches will get compacted. That makes it hard to figure out:
This test concretely observes the number of trace batches increasing and decreasing, and should break if we change trace compaction - but hopefully I'll be the only person hit by that for a while, and we can revisit the test when we have better introspection primitives |
Aljoscha approved from Slack and this test ran 200 times without error so merging! TFTR! |
This commit adds a smoke test to check that persisted tables are being compacted
as they should be, using metrics for the number of batches in a persistent trace
to assert that the number decreases as expected.
This test is a little bit brittle, as it is very coupled to the way trace compaction
works today. A better alternative would be some kind of system table that can
automatically return details like the since frontier or the number of trace
batches. That is left as a followup.
Motivation
Tips for reviewer
Checklist