Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
Why exactly table readers time out? Aren't they supposed to spin with reading the latest txn and then trying to acquire it? Or somehow we end up with the max txn being incremented many times in this scenario? |
Purge job calls isRangeAvailable(0,13) because it tries to clean up dropped table with the same dir name (non-wal table), this pushes max txn to 13 in the score board. Readers then timeout because the spin to acquire txn 0 read from the _txn file and they cannot, because max is 13. |
Gotcha, that's the culprit! |
[PR Coverage check]😍 pass : 20 / 22 (90.91%) file detail
|
Found by fuzz tests.
When a non-WAL table is dropped and re-created, purge jobs can push max txn using
TxnScoreboardPoolV2.isRangeAvailable()and it can lead to a timeout on opening TableReader, where it cannot lock the latest transaction in the scoreboard.The fix is not to modify the max in
TxnScoreboardPoolV2.isRangeAvailable(), making it a read-only scoreboard operation.