Skip to content
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

storage: fix TestRangeInfo flake and re-enable follower reads by default #35793

Merged
merged 1 commit into from Mar 18, 2019

Conversation

ajwerner
Copy link
Contributor

This PR addresses a test flake introduced by enabling follower reads in
conjunction with #35130 which makes follower reads more generally possible
in the face of lease transfer.

Fixes #35758.

Release note: None

@ajwerner ajwerner requested review from nvanbenschoten and a team March 15, 2019 17:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajwerner ajwerner force-pushed the ajwerner/reenable-follower-reads branch from 35901cd to d441ad1 Compare March 15, 2019 19:16
Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @nvanbenschoten)


pkg/storage/client_replica_test.go, line 1606 at r1 (raw file):

		t.Fatal(pErr)
	}
	lhsLease, _ = lhsReplica1.GetLease()

Would an alternative be to change these to lhsReplica0.GetLease() and rhsReplica0.GetLease()?


pkg/storage/client_replica_test.go, line 1609 at r1 (raw file):

	// triggered above. This is to protect against the case where the lease
	// transfer is applied on replica0 but not on replica1 at the time of the
	// above query. In this scenario replica0 can serve a follower read which

"which" what?

This PR addresses a test flake introduced by enabling follower reads in
conjunction with cockroachdb#35130 which makes follower reads more generally possible
in the face of lease transfer.

Fixes cockroachdb#35758.

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/reenable-follower-reads branch from d441ad1 to 16fb58b Compare March 16, 2019 17:22
Copy link
Contributor Author

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained


pkg/storage/client_replica_test.go, line 1606 at r1 (raw file):

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

Would an alternative be to change these to lhsReplica0.GetLease() and rhsReplica0.GetLease()?

Yes, done.

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@ajwerner
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 18, 2019

Build failed

@ajwerner
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Mar 18, 2019
35284: storage,kv: make transaction deadline exceeded errors retriable r=andreimatei a=andreimatei

Before this patch, they were opaque TransactionStatusErrors.
The belief is that we should only be seeing such errors when a
transaction is pushed by minutes. Shockingly, this seems to hapen enough
in our tests, for example as described here: #18684 (comment)

This patch marks the error as retriable, since it technically is.

This patch also changes the semantics of the
EndTransactionRequest.Deadline field to make it exclusive so that it
matches the nature of SQL leases. No migration needed.

Touches #18684

Release note (sql change): "transaction deadline exceeded" errors are
now returned to the client with a retriable code.

35793: storage: fix TestRangeInfo flake and re-enable follower reads by default r=ajwerner a=ajwerner

This PR addresses a test flake introduced by enabling follower reads in
conjunction with #35130 which makes follower reads more generally possible
in the face of lease transfer.

Fixes #35758.

Release note: None

35865: roachtest: Skip flaky jepsen nemesis r=tbg a=bdarnell

See #35599

Release note: None

Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
Co-authored-by: Andrew Werner <ajwerner@cockroachlabs.com>
Co-authored-by: Ben Darnell <ben@bendarnell.com>
@craig
Copy link
Contributor

craig bot commented Mar 18, 2019

Build succeeded

@craig craig bot merged commit 16fb58b into cockroachdb:master Mar 18, 2019
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.

None yet

3 participants