Skip to content

Batch snapshot is unsound #13553

Description

@BusyJay

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions