-
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
KVStore: Get addressed engine-addr from proxy #9174
Conversation
if (kvstore->getProxyConfigSummay().valid) | ||
{ |
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.
Seems the proxy config summary is only set as valid after KVStore::restore -> KVStore::fetchProxyConfig
. That is done in TMTContext::restore
, which is done after the TMTContext instance is build. Can we really get the proxy config to create the S3 GC Owner?
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, I will check that.
&& !context.getSharedContextDisagg()->isDisaggregatedComputeMode()) | ||
{ | ||
s3gc_owner = OwnerManager::createS3GCOwner(context, /*id*/ raft_config.advertise_engine_addr, etcd_client); | ||
if (kvstore->getProxyConfigSummay().valid) |
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.
It seems that the initialization sequence is a bit chaotic. Can we ensure that the proxy config summary is valid before creating the S3GCOwner?
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, fetchProxyConfig
acquires "addressed" proxy config from proxy, which is already set by proxy in run_impl
.
let mut proxy = RaftStoreProxy::new(
AtomicU8::new(RaftProxyStatus::Idle as u8),
tikv.core.encryption_key_manager.clone(),
Some(Box::new(ReadIndexClient::new(
tikv.router.clone(),
SysQuota::cpu_cores_quota() as usize * 2,
))),
None,
Some(tikv.pd_client.clone()),
proxy_config_str,
);
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JinheLin, 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:
|
…#231) Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
What problem does this PR solve?
Issue Number: close #8382
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note