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

pd: fix get_timestamp potentially hang #432

Merged
merged 3 commits into from
Nov 7, 2023
Merged

Conversation

pingyu
Copy link
Collaborator

@pingyu pingyu commented Nov 3, 2023

Close #431

Changes

  • Register waker when TsoRequestStream::poll_next() is blocked by lock of pending_requests. Otherwise TsoRequestStream will no be waken again and hang.
  • Handle leftover requests in requests before close the stream.
  • Optimize RetryClient::get_timestamp by changing to use read lock.

Signed-off-by: Ping Yu <yuping@pingcap.com>
Signed-off-by: Ping Yu <yuping@pingcap.com>
Signed-off-by: Ping Yu <yuping@pingcap.com>
@pingyu pingyu changed the title [WIP] pd: fix get_timestamp potentially hang pd: fix get_timestamp potentially hang Nov 7, 2023
@pingyu pingyu requested a review from iosmanthus November 7, 2023 06:56
@pingyu pingyu merged commit b12f95e into tikv:master Nov 7, 2023
4 checks passed
bxq2011hust pushed a commit to bxq2011hust/tikv-client-rust that referenced this pull request Mar 19, 2024
* fix get tso hang

Signed-off-by: Ping Yu <yuping@pingcap.com>

* wake

Signed-off-by: Ping Yu <yuping@pingcap.com>

* polish

Signed-off-by: Ping Yu <yuping@pingcap.com>

---------

Signed-off-by: Ping Yu <yuping@pingcap.com>
bxq2011hust pushed a commit to FISCO-BCOS/tikv-client-rust that referenced this pull request Mar 22, 2024
* fix get tso hang

Signed-off-by: Ping Yu <yuping@pingcap.com>

* wake

Signed-off-by: Ping Yu <yuping@pingcap.com>

* polish

Signed-off-by: Ping Yu <yuping@pingcap.com>

---------

Signed-off-by: Ping Yu <yuping@pingcap.com>
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.

Get timestamp has no response
2 participants