Skip to content

storage/batcheval/result: perform various cleanup on LocalResult struct#43703

Merged
craig[bot] merged 6 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/endCmds
Jan 6, 2020
Merged

storage/batcheval/result: perform various cleanup on LocalResult struct#43703
craig[bot] merged 6 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/endCmds

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Jan 2, 2020

This PR contains a series of cleanups to the result.LocalResult struct. It leaves the structure in a good position to be extended to include information about newly written, updated, and removed intents, which are hooked into the concurrency package in future commits the same way that UpdatedTxns is currently hooked into the TxnWaitQueue.

The changes are broken into a series of incremental steps to make them easier to review in isolation.

@nvb nvb requested a review from ajwerner January 2, 2020 21:38
@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.

:lgtm:

Reviewed 2 of 2 files at r1, 8 of 8 files at r2, 13 of 13 files at r3, 4 of 4 files at r4, 6 of 6 files at r5, 9 of 9 files at r6.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained


pkg/storage/intentresolver/intent_resolver.go, line 505 at r2 (raw file):

	ctx context.Context, intents []roachpb.Intent, allowSyncProcessing bool,
) error {
	if len(intents) == 0 {

This seems like it could be a nice optimization. Do you have a sense of whether that case comes up?

Copy link
Copy Markdown
Contributor Author

@nvb nvb 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! 1 of 0 LGTMs obtained


pkg/storage/intentresolver/intent_resolver.go, line 505 at r2 (raw file):

Previously, ajwerner wrote…

This seems like it could be a nice optimization. Do you have a sense of whether that case comes up?

I'm not sure whether it can come up. In fact, I don't think it currently does, but I wanted to keep the semantics that this method is a no-op (without launching any goroutines) if len(intents) == 0.

nvb added 6 commits January 6, 2020 12:42
The Arg part of this was never used.

Release note: None
This commit removes the pattern of storing pointers to slices in
LocalResult so that it remains "comaprable". This isn't worth the
complexity it creates, so this commit removes the pattern and stores
slices directly in the struct.

Release note: None
@nvb nvb force-pushed the nvanbenschoten/endCmds branch from 86639bd to eadef77 Compare January 6, 2020 17:43
@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Jan 6, 2020

bors r+

craig bot pushed a commit that referenced this pull request Jan 6, 2020
43703: storage/batcheval/result: perform various cleanup on LocalResult struct r=nvanbenschoten a=nvanbenschoten

This PR contains a series of cleanups to the `result.LocalResult` struct. It leaves the structure in a good position to be extended to include information about newly written, updated, and removed intents, which are hooked into the `concurrency` package in future commits the same way that `UpdatedTxns` is currently hooked into the TxnWaitQueue.

The changes are broken into a series of incremental steps to make them easier to review in isolation.

43722: opt: fix assertion failure due to lax empty key r=RaduBerinde a=RaduBerinde

PR #43532 removed the concept of lax constant functional dependencies.
There is a left-over case when we downgrade a key: if we had a strong
empty key, the result is a lax empty key which is no longer a concept.

This change fixes this by removing the key altogether in this case.

Fixes #43651.

Release note (bug fix): fixes "expected constant FD to be strict"
internal error.

43734: pgwire: deflake TestAuthenticationAndHBARules r=knz a=knz

Fixes #43733.

This was my mistake to fix, I had forgotten that cluster settings
propagate asynchronously.

Release note: None

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 6, 2020

Build succeeded

@craig craig bot merged commit eadef77 into cockroachdb:master Jan 6, 2020
@nvb nvb deleted the nvanbenschoten/endCmds branch January 6, 2020 18:57
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.

3 participants