Skip to content

Commit

Permalink
Revert "batcheval: Work around time-bound iterator bug in RefreshRange"
Browse files Browse the repository at this point in the history
This reverts commit ad54ae6.

Release note: None
  • Loading branch information
bdarnell committed Nov 14, 2018
1 parent 13d4a38 commit 02f35d1
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions pkg/storage/batcheval/cmd_refresh_range.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,33 +83,6 @@ func RefreshRange(
if i.Txn.ID == h.Txn.ID {
continue
}

if i.Span.EndKey != nil {
return result.Result{}, errors.Errorf("unexpected range intent from MVCC storage")
}

// HACK(bdarnell): Time-bound iterators can return intents that
// shouldn't be there
// (https://github.com/cockroachdb/cockroach/issues/28358), and
// this can result in stalled traffic when it occurs in this
// method (https://github.com/cockroachdb/cockroach/issues/31823).
// When we get an intent, check with a regular iterator to ensure
// that it's really there.
_, realIntents, err := engine.MVCCGetWithTombstone(
ctx,
batch,
i.Span.Key,
h.Txn.Timestamp,
false, /* consistent */
nil, /* txn */
)
if err != nil {
return result.Result{}, err
}
if len(realIntents) == 0 {
continue
}

// Return an error if an intent was written to the span.
return result.Result{}, errors.Errorf("encountered recently written intent %s @%s",
i.Span.Key, i.Txn.Timestamp)
Expand Down

0 comments on commit 02f35d1

Please sign in to comment.