-
Notifications
You must be signed in to change notification settings - Fork 411
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
Storages: Refine SegmentReadTaskPool and SegmentReadTaskScheduler #8237
Conversation
Skipping CI for Draft Pull Request. |
bae691e
to
95bc57b
Compare
5a5ffd8
to
3e0d29b
Compare
a05a968
to
c25429d
Compare
c25429d
to
8b0f1f3
Compare
/run-all-tests |
Co-authored-by: JaySon <[email protected]>
Co-authored-by: JaySon <[email protected]>
Co-authored-by: JaySon <[email protected]>
Co-authored-by: JaySon <[email protected]>
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
@@ -188,7 +187,7 @@ void RNWorkerFetchPages::doFetchPages( | |||
double total_write_page_cache_sec = 0.0; | |||
|
|||
pingcap::kv::RpcCall<pingcap::kv::RPC_NAME(FetchDisaggPages)> rpc( | |||
cluster->rpc_client, | |||
seg_task->dm_context->db_context.getTMTContext().getKVCluster()->rpc_client, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep a cluster
in RNWorkerFetchPages
. Getting it from seg_task->dm_context->db_context....
is too implicit and hard to write tests (if we do write tests later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic of the fetchpages is not pure, it depends on other member from dm_context
/db_context
. We cannot remove dm_context
/db_context
from fetchpages easily, so keep cluster
member seems not make much sense.
And I think the main logic of fetchpages should be member functions of SegmentReadTask
, instead of part the thread workers. The code also needs to be refined later.
If we write tests for it , we'd better to refine functions to accept a cluster
argument or set the member of dm_context
properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-unit-test |
1 similar comment
/run-unit-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
@JinheLin: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions 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. |
/run-all-tests |
What problem does this PR solve?
Issue Number: ref #6834
What is changed and how it works?
SegmentReadTaskPool
andSegmentReadTaskScheduler
preparing for supporting read-thread and data-sharing in disaggregated-mode. The logic of the reading path is still not changed after this PR.Main changes:
DMContext
andphysical_table_id
fromSegmentReadTaskPool
.SegmentReadTask
.EstablishDisaggTask
can returnSegmentReadTasks
of different physical tables. SoSegmentReadTaskPool
needs to supportSegmentReadTasks
of different physical tables.DMContext
intoSegmentReadTask
.GlobalSegmentID
to identify a segment inSegmentReadTaskScheduler
.physical_table_id
+segment_id
+segment_epoch
can identify a segment. In disaggregated-mode, it also needs to addstore_id
andkeyspace_id
.struct GlobalSegmentID
.SegmentReadTaskPtr
and removeSegmentReadTask::info
.cluster
member fromRNWorkerFetchPages
.RNReadTask
since it is redundant.Check List
Tests
Side effects
Documentation
Release note