resolved_ts: return early after regions already had quorum#11352
resolved_ts: return early after regions already had quorum#11352ti-chi-bot merged 11 commits intotikv:masterfrom
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
|
/run-all-tests |
479033c to
dbb7d6d
Compare
|
/run-integration-cdc-test |
|
/run-integration-cdc-test |
| }) | ||
| .collect(); | ||
| for _ in 0..store_count { | ||
| let (res, _, remains) = select_all(stores).await; |
There was a problem hiding this comment.
Can you add comments on why using select_all as opposed to the original solution using join_all?
| let leader_info_size = store_map | ||
| .values() | ||
| .next() | ||
| .map_or(0, |regions| regions[0].compute_size()); |
| // region_id -> peers id, record the responses | ||
| let mut resp_map: HashMap<u64, Vec<u64>> = HashMap::default(); | ||
| // region_id -> `(Vec<Peer>, LeaderInfo)` | ||
| let info_map = region_read_progress.dump_leader_infos(®ions); |
There was a problem hiding this comment.
How expensive is this function?
There was a problem hiding this comment.
O(n), n is the number of regions
Signed-off-by: 5kbpers <tangminghua@pingcap.com> Co-authored-by: Zixiong Liu <liuzixiong@pingcap.com>
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
| let cb = ChannelBuilder::new(env.clone()); | ||
| let channel = security_mgr.connect(cb, &store.address); | ||
| tikv_clients | ||
| .lock() | ||
| .unwrap() | ||
| .insert(store_id, TikvClient::new(channel)); |
There was a problem hiding this comment.
When do we release these connections?
There was a problem hiding this comment.
There is an issue #11400 about it, I think we can fix it in another PR.
There was a problem hiding this comment.
After some requests failed.
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
|
/run-all-tests |
|
/merge |
|
@5kbpers: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: a542652 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-5.3 in PR #11537 |
|
cherry pick to release-5.0 in PR #11538 |
|
cherry pick to release-5.2 in PR #11539 |
|
cherry pick to release-5.1 in PR #11540 |
* close tikv#11351 Signed-off-by: 5kbpers <tangminghua@pingcap.com> * fix tests Signed-off-by: 5kbpers <tangminghua@pingcap.com> * fix tests Signed-off-by: 5kbpers <tangminghua@pingcap.com> * Apply suggestions from code review Signed-off-by: 5kbpers <tangminghua@pingcap.com> Co-authored-by: Zixiong Liu <liuzixiong@pingcap.com> * address comments Signed-off-by: 5kbpers <tangminghua@pingcap.com> * make clippy happy Signed-off-by: 5kbpers <tangminghua@pingcap.com> * close tikv#11400 Signed-off-by: 5kbpers <tangminghua@pingcap.com> Co-authored-by: qupeng <qupeng@pingcap.com> Co-authored-by: Zixiong Liu <liuzixiong@pingcap.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
* resolved_ts: return early after regions already had quorum (#11352) * close #11351 Signed-off-by: 5kbpers <tangminghua@pingcap.com> * fix tests Signed-off-by: 5kbpers <tangminghua@pingcap.com> * fix tests Signed-off-by: 5kbpers <tangminghua@pingcap.com> * Apply suggestions from code review Signed-off-by: 5kbpers <tangminghua@pingcap.com> Co-authored-by: Zixiong Liu <liuzixiong@pingcap.com> * address comments Signed-off-by: 5kbpers <tangminghua@pingcap.com> * make clippy happy Signed-off-by: 5kbpers <tangminghua@pingcap.com> * close #11400 Signed-off-by: 5kbpers <tangminghua@pingcap.com> Co-authored-by: qupeng <qupeng@pingcap.com> Co-authored-by: Zixiong Liu <liuzixiong@pingcap.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * Support to iterate table properties for KvEngine (#11388) * support to iterate table properties for KvEngine * close #11387 Signed-off-by: qupeng <qupeng@pingcap.com> * cdc: introduce TsFilter into incremental scan (#11385) * close #11384 Signed-off-by: qupeng <qupeng@pingcap.com> * support to get approximate keys and size for a given range from UserCollectedProperties (#11465) Signed-off-by: qupeng <qupeng@pingcap.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * cherry pick pr #11615 Signed-off-by: qupeng <qupeng@pingcap.com> Co-authored-by: 5kbpers <tangminghua@pingcap.com> Co-authored-by: Zixiong Liu <liuzixiong@pingcap.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
… (tikv#11538) * ref tikv#11351 Signed-off-by: 5kbpers <tangminghua@pingcap.com> Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
Signed-off-by: 5kbpers tangminghua@pingcap.com
What problem does this PR solve?
Issue Number: close #11351
Problem Summary:
What is changed and how it works?
What's Changed:
region_resolved_ts_storefromresolved_tsand import it incdcselect_allinstead ofjoin_allfor returning earlyRelated changes
Check List
Tests
Release note