Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

MVTO: Allow reads of write locked tuples as long as reader's TS < writer's TS #1460

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mbutrovich
Copy link
Contributor

@mbutrovich mbutrovich commented Jul 11, 2018

Currently we abort if we try to read a tuple whose write lock is held by another transaction. This is too conservative. We can read the tuple if the txn holding the write lock has a timestamp greater than the reader's timestamp, since no matter what the writer does (commit or abort), that version of the committed tuple is the version that reader will see.

This also adds an optimization that if the current read timestamp of the tuple is greater than or equal to the transaction attempting to read, immediately succeed. There's no reason to try to take the latch to update the read timestamp to a smaller value.

@coveralls
Copy link

coveralls commented Jul 11, 2018

Coverage Status

Coverage decreased (-0.004%) to 76.507% when pulling 8c20445 on mbutrovich:mvto into 3bc6d46 on cmu-db:master.

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

Successfully merging this pull request may close these issues.

2 participants