mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 22:43:15 +00:00
The current `fast_forward_to(const dht::partition_range&)` implementation has two problems: * If the reader was not created yet, but there is an ongoing read-ahead (which is going to create it), the function bails out. This will result in this shard reader not being fast-forwarded to the new range at all. * If the reader was already created and there is an ongoing read-ahead, the function will wait for this to complete, then fast-forward the reader, as it should. However, the buffer is cleared *before* the read-ahead is waited for. So if the read-ahead brings in new data, this will land in the buffer. This data will be outside of the fast-forwarded-to range and worse, as we just cleared the buffer, it might violate mutation fragment stream monotonicity requirements. This patch fixes both of these bugs. Targeted reproducer unit tests are coming in the next patches.
83 KiB
83 KiB