Skip to content

batcheval: latch writes at MinTimestamp #148802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevendanna
Copy link
Collaborator

Retrying writers currently latch at their WriteTimestamp, allowing them to overlap with readers who might be reading intents from their previous Epoch. This is fine, but does lead to some interesting situations like the one described in #147065. In some cases, such readers will end up unnecessarily waiting on the old intent and will only be unblocked when a subsequent reader discovers the updated intent or when the writer completes its transaction.

Latching at the MinTimestamp would disallow the overlapping reader and writer. The reader would wait until the writer had updated its intent and then would proceed with its read.

Release note: None

Retrying writers currently latch at their WriteTimestamp, allowing them
to overlap with readers who might be reading intents from their previous
Epoch. This is fine, but does lead to some interesting situations like
the one described in cockroachdb#147065. In some cases, such readers will end up
unnecessarily waiting on the old intent and will only be unblocked when
a subsequent reader discovers the updated intent or when the writer
completes its transaction.

Latching at the MinTimestamp would disallow the overlapping reader and
writer. The reader would wait until the writer had updated its intent
and then would proceed with its read.

Release note: None
Copy link

blathers-crl bot commented Jun 25, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants