-
Notifications
You must be signed in to change notification settings - Fork 22
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
[Filestore] move RestoreEndpoints to Endpoint Manager #2502
base: main
Are you sure you want to change the base?
Conversation
86c6868
to
8abb838
Compare
1e14498
to
a375478
Compare
d09d551
to
44c6463
Compare
@@ -386,7 +384,9 @@ void TBootstrapVhost::StartComponents() | |||
FILESTORE_LOG_START_COMPONENT(Server); | |||
FILESTORE_LOG_START_COMPONENT(LocalServiceServer); | |||
|
|||
RestoreKeyringEndpoints(); | |||
if (EndpointManager) { |
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.
кажется, EndpointManager всегда должен существовать, разве нет?
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.
Ну на практике должен существовать всегда, но в теории наверное можно nullptr получить так как создается EndpointManager не в конструкторе, а в InitComponents()
Я больше ориентировался на другой код в этом классе чтобы было единообразно:
void TBootstrapVhost::Drain()
{
if (EndpointManager) {
EndpointManager->Drain();
}
}
#define FILESTORE_LOG_START_COMPONENT(c)
if (c) {
c->Start();
STORAGE_INFO("Started " << #c);
}
FILESTORE_LOG_START_COMPONENT(EndpointManager);
requestOrError.GetResult()); | ||
|
||
if (!request) { | ||
// TODO: report critical error |
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.
давай в следующем PR вот эти TODO сделаем, это быстро и просто
@@ -386,7 +384,9 @@ void TBootstrapVhost::StartComponents() | |||
FILESTORE_LOG_START_COMPONENT(Server); | |||
FILESTORE_LOG_START_COMPONENT(LocalServiceServer); | |||
|
|||
RestoreKeyringEndpoints(); | |||
if (EndpointManager) { | |||
EndpointManager->RestoreEndpoints(); |
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.
а почему игнорируем возвращаемое значение? точно не надо подождать на future?
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.
Ну я в этом плане не менял поведение. Внутри RestoreKeyringEndpoints тоже не ждали future.
В blockstore тоже не ждем, только подписываемся на результат:
https://github.com/ydb-platform/nbs/blob/main/cloud/blockstore/libs/daemon/common/bootstrap.cpp#L902
Мне нужна была future как возвращаемое значение чтобы можно было протестировать restore
issue: #2553
This refactoring is required to implement #2553