Skip to content

Spencerkimball/inconsistent reads#450

Merged
spencerkimball merged 4 commits intomasterfrom
spencerkimball/inconsistent-reads
Mar 31, 2015
Merged

Spencerkimball/inconsistent reads#450
spencerkimball merged 4 commits intomasterfrom
spencerkimball/inconsistent-reads

Conversation

@spencerkimball
Copy link
Copy Markdown
Member

MVCCGet and MVCCScan now take a "consistent" boolean which, if false,
ignores intents. Moved the guts of MVCCScan into MVCCIterate and MVCCScan
just calls into it. This change allows the removal of the MVCCIterateCommitted
method.

Provides a unittest for "deadloop" issue of encountering an extant intent
at a meta indexing record.

Fixes #343
Fixes #435

@spencerkimball spencerkimball force-pushed the spencerkimball/inconsistent-reads branch from e1c6318 to e65cf68 Compare March 21, 2015 01:21
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment appears to be outdated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@bdarnell
Copy link
Copy Markdown
Contributor

LGTM

@spencerkimball
Copy link
Copy Markdown
Member Author

Might want to take another look...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the CONSENSUS option until it's implemented? (Do we even need it? When would someone choose one or the other?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To pass Jepsen tests which mess with clocks to foil read leases. I'd like to just leave it in as a placeholder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is this ever a choice you'd want to make on a per-operation basis? Either you trust your clocks and choose between CONSISTENT and INCONSISTENT, or you don't and choose between CONSENSUS and INCONSISTENT. The choice between CONSISTENT and CONSENSUS seems to be best made at the level of the deployment instead of the operation.

@spencerkimball spencerkimball force-pushed the spencerkimball/inconsistent-reads branch from 888eabb to c195cbf Compare March 31, 2015 19:39
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why create an error variable here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pete's code. Unrelated to my change.

@bdarnell
Copy link
Copy Markdown
Contributor

LGTM

MVCCGet and MVCCScan now take a "consistent" boolean which, if false,
ignores intents. Moved the guts of MVCCScan into MVCCIterate and MVCCScan
just calls into it. This change allows the removal of the MVCCIterateCommitted
method.

Provides a unittest for "deadloop" issue of encountering an extant intent
at a meta indexing record.

Fixes #343
Fixes #435
If read consistency isn't required, a timestamp is assigned using
the local clock. This prevents cases where a different timestamp is
used for each part of a multi-range op, each assigned to the
respective node's clock at the time the RPC is received.

Also, if read consistency isn't required, don't insist that ops
spanning ranges be auto-wrapped in a transaction.

Fixed some errors in dist_sender.go with error handling. In one case
the error wasn't being cleared on the retry loop. In another, the
response error wasn't being examined after calling the RPC.
Address pull request feedback and add new unittests for command queue /
timestamp cache skipping functionality.
@spencerkimball spencerkimball force-pushed the spencerkimball/inconsistent-reads branch from c195cbf to 2bae48c Compare March 31, 2015 19:55
spencerkimball added a commit that referenced this pull request Mar 31, 2015
@spencerkimball spencerkimball merged commit 34f270c into master Mar 31, 2015
@spencerkimball spencerkimball deleted the spencerkimball/inconsistent-reads branch March 31, 2015 19:55
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.

deadloop between InternalRangeLookup and InternalPushTxn request Allow Inconsistent Read Operations

3 participants