Repository navigation
kv: add --forgotten, a transaction held open through the tpcc window, and the throughput of each ten seconds - #279
Merged
Merged
Conversation
… and the throughput of each ten seconds
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of tamnd/rudb#1390 (W7), the run with a deliberately forgotten open transaction that decides question 5 of
engine-v4/19-open-questions.md.Question 5 asks what happens when undo is over its share. Under option a writers wait, and a forgotten open transaction stops every writer in the database. Under option b, which rudb built at W6 (the undo spill of tamnd/rudb#1389), the collector spills the oldest undo and, at
max_temp_directory_size, aborts the oldest snapshot, and throughput should not move. The driver had no way to leave a transaction open, and it reported throughput only per second, too fine to read a slow fall over a long window.--forgotten(tpcc mode only) opens one more session. As the measured window opens it begins a read transaction withSession::begin_snapshot, runsSELECT count(*) FROM warehouseonce so it holds a snapshot, and then does nothing until the window ends, when it rolls back. It runs beside the terminals and, if asked, the--analyticstreams.The report adds
forgotten held_s= every_s=10 tx_per_s=a,b,c,..., the mean transactions a second over each ten seconds of the window, the last span perhaps shorter. Under option a the list should fall to zero after a bounded time. If the begin, the read or the rollback fails it printsforgotten error=and the run gets the verdictforgotten_failed.The window has to be long enough for undo to pass its share. For example
rudb-bench-kv --mode tpcc --backend rudb --target t.db --load --warehouses 2 --terminals 4 --analytic 2 --forgotten --warmup 30s --window 1800s.The driver only shows throughput. Undo resident, spill bytes and a
snapshot too oldabort come from rudb's own metrics, and the share size the question also asks about needs runs at severalmemory_limitsettings.Tests
main.rs:--forgottenparses in the tpcc mode and is refused in--mode ch.tpcc.rs: the ten second timeline is the mean of each span, the last may be short, and an empty run gives an empty list.