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

kv: intentionally handle paginated responses in txnPipeliner #108639

Merged

Conversation

nvanbenschoten
Copy link
Member

See #108539 (comment).

This commit adds intentional handling to the txnPipeliner for the case where a response is paginated and not all QueryIntent requests were evaluated. Previously, we handled this case, but we logged a warning and had a comment that said it was unexpected.

The commit also adds a test for the case.

Epic: None
Release note: None

See cockroachdb#108539 (comment).

This commit adds intentional handling to the txnPipeliner for the case
where a response is paginated and not all QueryIntent requests were
evaluated. Previously, we handled this case, but we logged a warning and
had a comment that said it was unexpected.

The commit also adds a test for the case.

Epic: None
Release note: None
@nvanbenschoten nvanbenschoten requested a review from a team as a code owner August 11, 2023 20:46
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@arulajmani arulajmani 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, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)


pkg/kv/kvclient/kvcoord/txn_interceptor_pipeliner.go line 718 at r1 (raw file):

				tp.lockFootprint.insert(roachpb.Span{Key: qiReq.Key})
			} else {
				log.Warningf(ctx,

Is there any value in improving this log line and putting it behind a vmodule? Or keeping a count of the number of empty QueryIntentRresponses we got here, and maybe print that number out behind a vmodule?

Feel free to disregard if this feels unnecessary.

Copy link
Member Author

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

TFTR!

bors r=arulajmani

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arulajmani)


pkg/kv/kvclient/kvcoord/txn_interceptor_pipeliner.go line 718 at r1 (raw file):

Previously, arulajmani (Arul Ajmani) wrote…

Is there any value in improving this log line and putting it behind a vmodule? Or keeping a count of the number of empty QueryIntentRresponses we got here, and maybe print that number out behind a vmodule?

Feel free to disregard if this feels unnecessary.

I was thinking that it may be valuable to keep the log.Warning for cases where we can detect that a batch response was not truncated, but doing so requires an extra iteration of the batch response to determine that above this loop, which did not seem worth it. Since this is now a known, expected condition, I think it's ok to keep without a log line. As we saw in #108539, the condition is rare, but workloads that do exercise this logic do so reliably and frequently (in that case, 656,000 times!).

@craig
Copy link
Contributor

craig bot commented Aug 12, 2023

Build succeeded:

@craig craig bot merged commit 352c765 into cockroachdb:master Aug 12, 2023
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten/queryIntentPaginate branch August 12, 2023 15: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.

3 participants