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: dequeue request from lock table wait-queues on scan error #111923

Merged

Conversation

nvanbenschoten
Copy link
Member

Informs #111352.
Informs #111530.
Informs #111564.
Informs #111893.

In 8205b43, we added a case to the lock table where a request's initial scan could throw an error. This was not being handled properly if the request had already entered any other lock wait-queues. In these cases, the request's entries in those wait-queues would be abandoned and the locks would get stuck. This commit fixes that issue by dequeuing the request from the lock table when throwing an error from ScanAndEnqueue.

This was one of the causes of the recent kvnemesis instability, but we believe that there is at least one other issue that is still causing timeouts.

Release note: None

Informs cockroachdb#111352.
Informs cockroachdb#111530.
Informs cockroachdb#111564.
Informs cockroachdb#111893.

This commit demonstrates that when an initial call to the lockTable's
ScanAndEnqueue method returns an error, the request was not previously being
dequeued from any other wait-queues that it may have entered.

Release note: None
Informs cockroachdb#111352.
Informs cockroachdb#111530.
Informs cockroachdb#111564.
Informs cockroachdb#111893.

In 8205b43, we added a case to the lock table where a request's initial scan
could throw an error. This was not being handled properly if the request had
already entered any other lock wait-queues. In these cases, the request's entries
in those wait-queues would be abandoned and the locks would get stuck. This commit
fixes that issue by dequeuing the request from the lock table when throwing an
error from ScanAndEnqueue.

This was one of the causes of the recent kvnemesis instability, but we believe
that there is at least one other issue that is still causing timeouts.

Release note: None
@nvanbenschoten nvanbenschoten requested a review from a team as a code owner October 6, 2023 16:53
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

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

@nvanbenschoten
Copy link
Member Author

TFTR @AlexTalks!

bors r+

@nvanbenschoten
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Oct 6, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Oct 6, 2023

Build succeeded:

@craig craig bot merged commit 7437e29 into cockroachdb:master Oct 6, 2023
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten/bugFixSharePromotion branch October 7, 2023 00:23
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