Skip to content

Commit

Permalink
Fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Sep 6, 2024
1 parent 14fd621 commit fe06452
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ydb/services/metadata/manager/alter_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class TModificationActorImpl: public NActors::TActorBootstrapped<TModificationAc
void Handle(TEvFetchDatabaseResponse::TPtr& ev) {
TString errorMessage;
if (const auto& errorString = ev->Get()->GetErrorString()) {
errorMessage = TStringBuilder() << "Cannot fetch database '" << Context.GetExternalData().GetDatabase() << "': " << errorString;
errorMessage = TStringBuilder() << "Cannot fetch database '" << Context.GetExternalData().GetDatabase() << "': " << *errorString;
} else if (ev->Get()->GetServerless()) {
errorMessage = TStringBuilder() << "Objects " << TObject::GetTypeId() << " are disabled for serverless domains. Please contact your system administrator to enable it";
}
Expand Down
2 changes: 1 addition & 1 deletion ydb/services/metadata/manager/fetch_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TDatabaseFetcherActor : public TActorBootstrapped<TDatabaseFetcherActor> {
return false;
}

void Reply(const TString& errorMessage = "") {
void Reply(const std::optional<TString>& errorMessage = std::nullopt) {
Send(Owner, new TEvFetchDatabaseResponse(Serverless, errorMessage));
PassAway();
}
Expand Down
4 changes: 2 additions & 2 deletions ydb/services/metadata/manager/fetch_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ namespace NKikimr::NMetadata::NModifications {
class TEvFetchDatabaseResponse : public TEventLocal<TEvFetchDatabaseResponse, EvFetchDatabaseResponse> {
private:
YDB_READONLY_DEF(bool, Serverless);
YDB_READONLY_DEF(TString, ErrorString);
YDB_READONLY_DEF(std::optional<TString>, ErrorString);

public:
TEvFetchDatabaseResponse(bool serverless, const TString& errorString)
TEvFetchDatabaseResponse(bool serverless, const std::optional<TString>& errorString)
: Serverless(serverless)
, ErrorString(errorString)
{}
Expand Down

0 comments on commit fe06452

Please sign in to comment.