Skip to content

Commit f24b02a

Browse files
authored
schemeboard: fix path updates from both root and tenant schemeshards (#2574)
1 parent 179a3cb commit f24b02a

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

ydb/core/tx/scheme_board/replica.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,6 @@ class TReplica: public TMonitorableActor<TReplica> {
248248
TrackMemory();
249249
}
250250

251-
explicit TDescription(
252-
TReplica* owner,
253-
const TPathId& pathId,
254-
TOpaquePathDescription&& pathDescription)
255-
: Owner(owner)
256-
, PathId(pathId)
257-
, PathDescription(std::move(pathDescription))
258-
{
259-
TrackMemory();
260-
}
261-
262251
explicit TDescription(
263252
TReplica* owner,
264253
const TString& path,
@@ -540,13 +529,13 @@ class TReplica: public TMonitorableActor<TReplica> {
540529
}
541530

542531
// upsert description only by pathId
543-
TDescription& UpsertDescription(const TPathId& pathId, TOpaquePathDescription&& pathDescription) {
532+
TDescription& UpsertDescriptionByPathId(const TString& path, const TPathId& pathId, TOpaquePathDescription&& pathDescription) {
544533
SBR_LOG_I("Upsert description"
545534
<< ": pathId# " << pathId
546535
<< ", pathDescription# " << pathDescription.ToString()
547536
);
548537

549-
return Descriptions.Upsert(pathId, TDescription(this, pathId, std::move(pathDescription)));
538+
return Descriptions.Upsert(pathId, TDescription(this, path, pathId, std::move(pathDescription)));
550539
}
551540

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

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

925914
log("Inject description only by pathId, it is update from GSS");
926-
UpsertDescription(pathId, std::move(pathDescription));
915+
UpsertDescriptionByPathId(path, pathId, std::move(pathDescription));
927916
return AckUpdate(ev);
928917
}
929918

0 commit comments

Comments
 (0)