Skip to content

Commit

Permalink
filestore: remove endpoint if path is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmyagkov committed Nov 14, 2024
1 parent 98d2c20 commit 8abb838
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cloud/filestore/libs/daemon/vhost/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <cloud/storage/core/libs/user_stats/counter/user_counter.h>

#include <contrib/ydb/core/blobstorage/lwtrace_probes/blobstorage_probes.h>
#include <contrib/ydb/core/protos/flat_tx_scheme.pb.h>
#include <contrib/ydb/core/tablet_flat/probes.h>

#include <library/cpp/monlib/dynamic_counters/counters.h>
Expand Down Expand Up @@ -460,9 +461,19 @@ void TBootstrapVhost::RestoreKeyringEndpoints()
future.Subscribe([=] (const auto& f) {
const auto& response = f.GetValue();
if (HasError(response)) {
const auto& error = response.GetError();
// TODO: report critical error
STORAGE_ERROR("Failed to start endpoint: "
<< FormatError(response.GetError()));
STORAGE_ERROR(
"Failed to start endpoint: " << FormatError(error));
if (response.GetError().GetCode() ==
MAKE_SCHEMESHARD_ERROR(
NKikimrScheme::EStatus::StatusPathDoesNotExist))
{
STORAGE_INFO(
"Remove endpoint for non-existing volume. endpoint id: "
<< keyringId.Quote());
EndpointStorage->RemoveEndpoint(keyringId);
}
}
});
}
Expand Down

0 comments on commit 8abb838

Please sign in to comment.