Skip to content

Async commit does not ensure linearizability #8589

@sticnarf

Description

@sticnarf

Bug Report

Read in the same session

Read with max u64 immediately after an async commit transaction. Because the lock in the previous transaction may be not committed yet, and locks can be ignored if we read with max u64. So we may not read the latest changes from the last async commit transaction.

Causal consistency across nodes

Example:

At first the values of k1 and k2 are all 0, they can locate in different regions.

We commit k1=1@100 at first. The max_read_ts of the k2 region leader is 50.

Then, we prewrite and commit k2=1@51 using async commit.

Now, a transaction with start_ts=80, reads k1 and k2 in the same transaction. We get k1=0, k2=1.

We break an external consistency that k2 commits later than k1.

Affected version

master

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions