Bug Report
What version of TiKV are you using?
Nightly
What operating system and CPU are you using?
Doesn't matter
Steps to reproduce
Concurrent read and conf change may read incomplete data.
What did you expect?
What did happened?
#7878 introduces batch snapshot across regions. It reorders the snapshot operation and lease check operation, so snapshot is taken after checking lease. It's possible that after checking the lease and before snapshot is taken, the region is removed by conf change. So the snapshot may not contain the complete data.
To solve the problems, we need to make sure snapshot is taken before lease check.
/cc @hicqu
Bug Report
What version of TiKV are you using?
Nightly
What operating system and CPU are you using?
Doesn't matter
Steps to reproduce
Concurrent read and conf change may read incomplete data.
What did you expect?
What did happened?
#7878 introduces batch snapshot across regions. It reorders the snapshot operation and lease check operation, so snapshot is taken after checking lease. It's possible that after checking the lease and before snapshot is taken, the region is removed by conf change. So the snapshot may not contain the complete data.
To solve the problems, we need to make sure snapshot is taken before lease check.
/cc @hicqu