Logs should be visible only after commit succeeds#380
Open
Conversation
Contributor
📊 Benchmark Resultsget-sync.bench.tsgetSync() > random keys - small key size (100 records)
getSync() > sequential keys - small key size (100 records)
ranges.bench.tsgetRange() > small range (100 records, 50 range)
realistic-load.bench.tsRealistic write load with workers > write variable records with transaction log
transaction-log.bench.tsTransaction log > read 100 iterators while write log with 100 byte records
Transaction log > read one entry from random position from log with 1000 100 byte records
worker-put-sync.bench.tsputSync() > random keys - small key size (100 records, 10 workers)
worker-transaction-log.bench.tsTransaction log with workers > write log with 100 byte records
Results from commit c5763c8 |
…ually complete, reseting the transaction so it can be properly re-executed and preserving the log position for accurate/consistent reporting of log visibility after commit success
e9f002b to
713f1f9
Compare
713f1f9 to
912ea50
Compare
cdfffa3 to
9b01911
Compare
Member
Author
|
I have had some weird flakiness with the benchmarks, but it is green right now 🤔 . |
Contributor
Me too. I restarted the GitHub runner on my server, but I don't think it helped. Not sure what's up. |
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.
Currently logs were being made visible after a commit finishes, regardless of whether or not it actually committed the data. Specifically if the commit is "busy" (conflicted), the log position was being updated even though the corresponding data was not committed and visible/readable yet.
With this PR, the logs won't be made immediately visible if the commit is conflicted and does not actually complete. In order for the logs to be made visible and the position to be properly updated on the retry, I believe we need to preserve the existing transaction instance/handle to continue tracking the log position and a reset the transaction so it can be properly re-executed and the preserved log position can be used when the commit does eventually succeed for accurate/consistent reporting of log visibility. (I know we have previously discussed a preference for creating entirely new transaction wrappers to reset, but I am not sure how we would do that and continue to track the internal log position without exposing more complexity).