Skip to content

concurrency_manager: add slow_latch_observability test#73916

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:slow-latch-test
Dec 22, 2021
Merged

concurrency_manager: add slow_latch_observability test#73916
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:slow-latch-test

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Dec 16, 2021

This came out of
#65099 (comment).

This adds an explicit test focusing on latch observability (i.e. if
we're waiting for a latch, can we learn what we're waiting for).

It demonstrates that we're doing "ok" but could be doing better in
the case in which the wait queue has a length of strictly greater
than one. In that case, we will trace the waiter immediately in
front of us, but not the heads of the queue. In the case in which
a slow request evaluation is causing subsequent requests to be
delayed as well, this is not helpful as the head(s) of the queues
need to be logged instead.

Release note: None

@tbg tbg requested a review from a team as a code owner December 16, 2021 14:14
@tbg tbg requested a review from nvb December 16, 2021 14:14
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

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

:lgtm:

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


pkg/kv/kvserver/concurrency/testdata/concurrency_manager/slow_latch_observability, line 55 at r1 (raw file):

[-] finish readbf: finishing request
[3] sequence pute: scanning lock table for conflicting locks
[3] sequence pute: sequencing complete, returned guard

Let's add a reset command to the end of this, which will verify that we aren't leaking any requests. I think it will show that we are, so we'll first need a finish req=pute.

This came out of
cockroachdb#65099 (comment).

This adds an explicit test focusing on latch observability (i.e. if
we're waiting for a latch, can we learn what we're waiting for).

It demonstrates that we're doing "ok" but could be doing better in
the case in which the wait queue has a length of strictly greater
than one. In that case, we will trace the waiter immediately in
front of us, but not the heads of the queue. In the case in which
a slow request evaluation is causing subsequent requests to be
delayed as well, this is not helpful as the head(s) of the queues
need to be logged instead.

Release note: None
@tbg tbg requested a review from nvb December 22, 2021 15:08
Copy link
Copy Markdown
Member Author

@tbg tbg 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=nvanbenschoten

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


pkg/kv/kvserver/concurrency/testdata/concurrency_manager/slow_latch_observability, line 55 at r1 (raw file):

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

Let's add a reset command to the end of this, which will verify that we aren't leaking any requests. I think it will show that we are, so we'll first need a finish req=pute.

Done.

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 22, 2021

Build succeeded:

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