Skip to content

Commit

Permalink
Merge pull request #16893 from bdarnell/deflake-split-snapshot
Browse files Browse the repository at this point in the history
storage: Deflake TestSplitSnapshotRace_SnapshotWins
  • Loading branch information
bdarnell authored Jul 6, 2017
2 parents 99f4451 + fec5c51 commit 54365a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/storage/client_split_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,17 @@ func runSetupSplitSnapshotRace(
// Store 3 still has the old value, but 4 and 5 are up to date.
mtc.waitForValues(rightKey, []int64{0, 0, 0, 2, 5, 5})

// Scan the meta ranges to resolve all intents
if _, pErr := client.SendWrapped(context.Background(), mtc.distSenders[0],
&roachpb.ScanRequest{
Span: roachpb.Span{
Key: keys.MetaMin,
EndKey: keys.MetaMax,
},
}); pErr != nil {
t.Fatal(pErr)
}

// Stop the remaining data stores.
mtc.stopStore(1)
mtc.stopStore(2)
Expand Down
1 change: 1 addition & 0 deletions pkg/storage/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ func (t *multiTestContextKVTransport) SendNext(ctx context.Context, done chan<-
t.mtc.mu.RUnlock()
// Make a copy and clone txn of batch args for sending.
baCopy := t.args
baCopy.Replica = rep.ReplicaDescriptor
if txn := baCopy.Txn; txn != nil {
txnClone := baCopy.Txn.Clone()
baCopy.Txn = &txnClone
Expand Down

0 comments on commit 54365a7

Please sign in to comment.