Skip to content

schemeboard: fix path updates from both root and tenant schemeshards #2574

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions ydb/core/tx/scheme_board/replica.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,6 @@ class TReplica: public TMonitorableActor<TReplica> {
TrackMemory();
}

explicit TDescription(
TReplica* owner,
const TPathId& pathId,
TOpaquePathDescription&& pathDescription)
: Owner(owner)
, PathId(pathId)
, PathDescription(std::move(pathDescription))
{
TrackMemory();
}

explicit TDescription(
TReplica* owner,
const TString& path,
Expand Down Expand Up @@ -540,13 +529,13 @@ class TReplica: public TMonitorableActor<TReplica> {
}

// upsert description only by pathId
TDescription& UpsertDescription(const TPathId& pathId, TOpaquePathDescription&& pathDescription) {
TDescription& UpsertDescriptionByPathId(const TString& path, const TPathId& pathId, TOpaquePathDescription&& pathDescription) {
SBR_LOG_I("Upsert description"
<< ": pathId# " << pathId
<< ", pathDescription# " << pathDescription.ToString()
);

return Descriptions.Upsert(pathId, TDescription(this, pathId, std::move(pathDescription)));
return Descriptions.Upsert(pathId, TDescription(this, path, pathId, std::move(pathDescription)));
}

// upsert description by path AND pathId both
Expand Down Expand Up @@ -898,7 +887,7 @@ class TReplica: public TMonitorableActor<TReplica> {
if (abandonedSchemeShards.contains(pathId.OwnerId)) { // TSS is ignored, present GSS reverted it
log("Replace GSS by TSS description is rejected, GSS implicitly knows that TSS has been reverted"
", but still inject description only by pathId for safe");
UpsertDescription(pathId, std::move(pathDescription));
UpsertDescriptionByPathId(path, pathId, std::move(pathDescription));
return AckUpdate(ev);
}

Expand All @@ -923,7 +912,7 @@ class TReplica: public TMonitorableActor<TReplica> {
}

log("Inject description only by pathId, it is update from GSS");
UpsertDescription(pathId, std::move(pathDescription));
UpsertDescriptionByPathId(path, pathId, std::move(pathDescription));
return AckUpdate(ev);
}

Expand Down