-
Notifications
You must be signed in to change notification settings - Fork 409
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
Server: Introduce proxy state machine #9856
Conversation
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
/check-issue-triage |
/check-issue-triage-complete |
Signed-off-by: Calvin Neo <[email protected]>
Co-authored-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
And we can Move function getKeyManager to ProxyStateMachine to simplify the code in Server.cpp. Checkout this PR please CalvinNeo#14 |
Signed-off-by: Calvin Neo <[email protected]>
It seems to me that the creation of the
So, instead, I think this could be extracted into a function like |
If |
Yes it does, and so do TMTContext, KVStore and Context. The lifetime and functionality of Proxy can affect all these modules. Currently some modules related to each other in a complicated pattern. So although the Moving this utilities into a
|
Signed-off-by: Calvin Neo <[email protected]>
Co-authored-by: jinhelin <[email protected]>
Co-authored-by: jinhelin <[email protected]>
is_proxy_runnable = tryParseFromConfig(config, disaggregated_mode, use_autoscaler, log); | ||
|
||
args.push_back("TiFlash Proxy"); | ||
for (const auto & v : val_map) |
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.
We use val_map
to update args
here, but val_map
and args
will be update simultaneously in addExtraArgs
. It looks a bit chaotic.
Why need val_map
in TiFlashProxyConfig?
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.
Oh...args
contains raw pointer to val_map
.
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 think val_map is for ownership, and args is for view
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 have refined the code of args
in this PR: CalvinNeo#15
Only maintain val_map
and generate args
by calling getArgs
to avoid maintains val_map
and args
simultaneously.
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.
Yes, it is clearer, thx. Merged.
else | ||
{ | ||
// Could be a auto-scaled compute node. | ||
LOG_INFO(log, "KVStore is not initialized because no store_ident is provided"); | ||
} |
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 think we can remove this branch. Now for non-disagg mode, the UniPS is not enabled so the store_ident
is nullopt.
And for non-disagg mode, the StoreIdnet will be set by the FFI fn_set_store
. Outputing this logging could be misleading.
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.
removed
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, JinheLin 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:
|
/cherry-pick release-8.5 |
Signed-off-by: ti-chi-bot <[email protected]>
@CalvinNeo: new pull request created to branch In response to this:
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. |
ref pingcap#9855, close pingcap#9857 Signed-off-by: Calvin Neo <[email protected]> Co-authored-by: jinhelin <[email protected]>
What problem does this PR solve?
Issue Number: close #9857 ref #9855
Problem Summary:
This is a trivial refinement of code to make proxy codes not so tangled with in
Server::main
.This endeavor is to start TiFlash storage layer alone without Proxy and KVStore module, and make further cp easy.
We'd like to cp this PR into release-8.5 in order to keep compatible with cse TiFlash.
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note