Skip to content

kv: return error from checkNegotiateAndSendPreconditions#69046

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/checkBoundedStaleness
Aug 28, 2021
Merged

kv: return error from checkNegotiateAndSendPreconditions#69046
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/checkBoundedStaleness

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Aug 17, 2021

Instead of panicking. Discussed in #68969.

Release justification: change to new functionality

@nvb nvb requested review from ajwerner and otan August 17, 2021 18:58
@nvb nvb requested a review from a team as a code owner August 17, 2021 18:58
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@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.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten and @otan)


pkg/kv/txn.go, line 1122 at r1 (raw file):

Quoted 5 lines of code…

			err := errors.AssertionFailedf("%s: ba=%s, txn=%s", s, ba.String(), txn.String())
			err = errors.WithContextTags(err, ctx)
			panic(err)
		}

You could just do a CombineErrors here and avoid the nil check. Probably not a bad idea to accumulate all of the ways in which expectations were violated.

Instead of panicking. Discussed in cockroachdb#68969.

Release justification: change to new functionality
@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Aug 27, 2021

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 27, 2021

This PR was included in a batch that was canceled, it will be automatically retried

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 27, 2021

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 27, 2021

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 28, 2021

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 28, 2021

Build succeeded:

@craig craig bot merged commit e016cd6 into cockroachdb:master Aug 28, 2021
@nvb nvb deleted the nvanbenschoten/checkBoundedStaleness branch August 28, 2021 16: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.

4 participants