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

cdc: fix incorrect resolved ts timeout #8573

Merged
merged 3 commits into from
Sep 3, 2020
Merged

Conversation

5kbpers
Copy link
Member

@5kbpers 5kbpers commented Sep 2, 2020

Signed-off-by: 5kbpers tangminghua@pingcap.com

What problem does this PR solve?

Problem Summary:

Resolved ts was advanced periodically by getting tso and waiting for timeout simultaneously, which makes tso delayed.

What is changed and how it works?

Get tso after timeout.

Proposal: xxx

What's Changed:

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Release note

  • N/A

Signed-off-by: 5kbpers <tangminghua@pingcap.com>
futures03::future::join(tso, timeout.compat().map_err(|_| unreachable!())).await;
let _ = timeout.compat().await;
// Ignore get tso errors since we will retry every `min_ts_interval`.
let mut min_ts = tso.unwrap_or_default();
let mut min_ts = tso.await.unwrap_or_default();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If tso response arrives immediately, it still delays a timeout.

Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ti-srebot ti-srebot added the status/LGT1 Status: PR - There is already 1 approval label Sep 2, 2020
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
Copy link
Contributor

@MyonKeminta MyonKeminta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. By the way is the latency shorter now?

@ti-srebot ti-srebot removed the status/LGT1 Status: PR - There is already 1 approval label Sep 3, 2020
@ti-srebot ti-srebot added the status/LGT2 Status: PR - There are already 2 approvals label Sep 3, 2020
@overvenus
Copy link
Member

/merge

@ti-srebot ti-srebot added the status/can-merge Status: Can merge to base branch label Sep 3, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 870da5e into tikv:master Sep 3, 2020
@5kbpers 5kbpers added the needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 label Sep 3, 2020
ti-srebot pushed a commit to ti-srebot/tikv that referenced this pull request Sep 3, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #8588

@5kbpers
Copy link
Member Author

5kbpers commented Sep 3, 2020

LGTM. By the way is the latency shorter now?

Yes, previously resolved ts has at least 1s gap and now it was eliminated.

5kbpers added a commit to ti-srebot/tikv that referenced this pull request Sep 3, 2020
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
ti-srebot added a commit that referenced this pull request Sep 9, 2020
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
ldeng-ustc pushed a commit to ldeng-ustc/tikv that referenced this pull request Sep 12, 2020
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 status/can-merge Status: Can merge to base branch status/LGT2 Status: PR - There are already 2 approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants