tikv / client-rust

Rust Client for TiKV.
Apache License 2.0
389 stars 131 forks source link

Adding retryable to scan #454

Closed limbooverlambda closed 5 months ago

limbooverlambda commented 5 months ago

solve: https://github.com/tikv/client-rust/issues/455

We were running into an issue with scans where periodically we noticed scans returning empty results for datasets that were present in a cluster. The hypothesis was that the scans were returning empties when the regions are undergoing splits. While trying to reproduce the issue (by issuing splits from pd-ctl), we found out that when there's a region error (epoch_version_mismatch et al), the scan_inner is not triggering any cache invalidations and subsequent retries. The scan simply returns an empty. This PR is fixing the issue by triggering the invalidations and retry for such issues.

@pingyu @ekexium @andylokandy.