Skip to content

Commit

Permalink
schemeshard: remove unused field PathOwner from TEvDescribeSchemeResult
Browse files Browse the repository at this point in the history
PathOwner field was replaced by PathOwnerId a long time ago.
  • Loading branch information
ijon committed Feb 19, 2024
1 parent 93bf8e9 commit 5ba8840
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ydb/core/protos/flat_tx_scheme.proto
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ message TEvDescribeSchemeResult {
optional string Reason = 2;
optional string Path = 3;
optional NKikimrSchemeOp.TPathDescription PathDescription = 4;
optional fixed64 PathOwner = 5;
optional fixed64 DEPRECATED_PathOwner = 5; // replaced by PathOwnerId
optional fixed64 PathId = 6;

optional string LastExistedPrefixPath = 7;
Expand Down
8 changes: 4 additions & 4 deletions ydb/core/tx/scheme_board/load_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ class TLoadProducer: public TActorBootstrapped<TLoadProducer> {
TDescription& dirDesc = dirDescTwoPart.Record;

dirDesc.SetStatus(NKikimrScheme::StatusSuccess);
dirDesc.SetPathOwner(owner);
dirDesc.SetPathOwnerId(owner);
dirDesc.SetPathId(nextPathId++);
dirDesc.SetPath(dirPath);

auto& dirSelf = *dirDesc.MutablePathDescription()->MutableSelf();
dirSelf.SetName(dirName);
dirSelf.SetPathId(dirDesc.GetPathId());
dirSelf.SetSchemeshardId(dirDesc.GetPathOwner());
dirSelf.SetSchemeshardId(dirDesc.GetPathOwnerId());
dirSelf.SetPathType(NKikimrSchemeOp::EPathTypeDir);
dirSelf.SetCreateFinished(true);
dirSelf.SetCreateTxId(1);
Expand All @@ -84,7 +84,7 @@ class TLoadProducer: public TActorBootstrapped<TLoadProducer> {
TDescription& objDesc = objDescTwoPart.Record;

objDesc.SetStatus(NKikimrScheme::StatusSuccess);
objDesc.SetPathOwner(owner);
objDesc.SetPathOwnerId(owner);
objDesc.SetPathId(nextPathId++);
objDesc.SetPath(objPath);

Expand All @@ -94,7 +94,7 @@ class TLoadProducer: public TActorBootstrapped<TLoadProducer> {
dirChildren.Add()->CopyFrom(objSelf);

objSelf.SetPathId(objDesc.GetPathId());
objSelf.SetSchemeshardId(objDesc.GetPathOwner());
objSelf.SetSchemeshardId(objDesc.GetPathOwnerId());
objSelf.SetCreateFinished(true);
objSelf.SetCreateTxId(1);
objSelf.SetCreateStep(1);
Expand Down
7 changes: 3 additions & 4 deletions ydb/core/tx/schemeshard/schemeshard.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,9 @@ struct TEvSchemeShard {
EvDescribeSchemeResult> {
TEvDescribeSchemeResult() = default;

TEvDescribeSchemeResult(const TString& path, ui64 pathOwner, TPathId pathId)
TEvDescribeSchemeResult(const TString& path, TPathId pathId)
{
Record.SetPath(path);
Record.SetPathOwner(pathOwner);
Record.SetPathId(pathId.LocalPathId);
Record.SetPathOwnerId(pathId.OwnerId);
}
Expand All @@ -345,8 +344,8 @@ struct TEvSchemeShard {

TEvDescribeSchemeResultBuilder() = default;

TEvDescribeSchemeResultBuilder(const TString& path, ui64 pathOwner, TPathId pathId)
: TEvDescribeSchemeResult(path, pathOwner, pathId)
TEvDescribeSchemeResultBuilder(const TString& path, TPathId pathId)
: TEvDescribeSchemeResult(path, pathId)
{
}
};
Expand Down
8 changes: 2 additions & 6 deletions ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,7 @@ THolder<TEvSchemeShard::TEvDescribeSchemeResultBuilder> TPathDescriber::Describe
pathStr = path.PathString();
}

Result.Reset(new TEvSchemeShard::TEvDescribeSchemeResultBuilder(
pathStr,
Self->TabletID(),
pathId
));
Result.Reset(new TEvSchemeShard::TEvDescribeSchemeResultBuilder(pathStr, pathId));
Result->Record.SetStatus(checks.GetStatus());
Result->Record.SetReason(checks.GetError());

Expand All @@ -963,7 +959,7 @@ THolder<TEvSchemeShard::TEvDescribeSchemeResultBuilder> TPathDescriber::Describe
}
}

Result = MakeHolder<TEvSchemeShard::TEvDescribeSchemeResultBuilder>(pathStr, Self->TabletID(), pathId);
Result = MakeHolder<TEvSchemeShard::TEvDescribeSchemeResultBuilder>(pathStr, pathId);

auto descr = Result->Record.MutablePathDescription()->MutableSelf();
FillPathDescr(descr, path);
Expand Down
6 changes: 3 additions & 3 deletions ydb/core/tx/tx_proxy/describe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class TDescribeReq : public TActor<TDescribeReq> {
auto schemeShardId = entry.DomainInfo->DomainKey.OwnerId;

auto result = MakeHolder<NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResultBuilder>(
path, schemeShardId, TPathId());
path, TPathId());

auto* pathDescription = result->Record.MutablePathDescription();
auto* self = pathDescription->MutableSelf();
Expand Down Expand Up @@ -151,7 +151,7 @@ class TDescribeReq : public TActor<TDescribeReq> {
auto schemeShardId = entry.DomainInfo->DomainKey.OwnerId;

auto result = MakeHolder<NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResultBuilder>(
path, schemeShardId, TPathId());
path, TPathId());

auto* pathDescription = result->Record.MutablePathDescription();
auto* self = pathDescription->MutableSelf();
Expand Down Expand Up @@ -237,7 +237,7 @@ void TDescribeReq::Handle(TEvTxProxyReq::TEvNavigateScheme::TPtr &ev, const TAct
if (record.GetDescribePath().GetPath() == "/") {
// Special handling for enumerating roots
TAutoPtr<NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResultBuilder> result =
new NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResultBuilder("/", NSchemeShard::RootSchemeShardId, TPathId(NSchemeShard::RootSchemeShardId, NSchemeShard::RootPathId));
new NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResultBuilder("/", TPathId(NSchemeShard::RootSchemeShardId, NSchemeShard::RootPathId));
auto descr = result->Record.MutablePathDescription();
FillRootDescr(descr->MutableSelf(), "/", NSchemeShard::RootSchemeShardId);
for (const auto& domain : domainsInfo->Domains) {
Expand Down
2 changes: 0 additions & 2 deletions ydb/core/viewer/json_describe.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ class TJsonDescribe : public TViewerPipeClient<TJsonDescribe> {
result->SetReason(record.GetReason());
result->SetPath(record.GetPath());
result->MutablePathDescription()->CopyFrom(record.GetPathDescription());
result->SetPathOwner(record.GetPathOwner());
result->SetPathId(record.GetPathId());
result->SetLastExistedPrefixPath(record.GetLastExistedPrefixPath());
result->SetLastExistedPrefixPathId(record.GetLastExistedPrefixPathId());
Expand All @@ -206,7 +205,6 @@ class TJsonDescribe : public TViewerPipeClient<TJsonDescribe> {

TAutoPtr<NKikimrViewer::TEvDescribeSchemeInfo> result(new NKikimrViewer::TEvDescribeSchemeInfo());
result->SetPath(path);
result->SetPathOwner(schemeShardId);
result->SetPathId(pathId.LocalPathId);
result->SetPathOwnerId(pathId.OwnerId);

Expand Down
2 changes: 1 addition & 1 deletion ydb/core/viewer/protos/viewer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ message TEvDescribeSchemeInfo {
optional string Reason = 2;
optional string Path = 3;
optional NKikimrSchemeOp.TPathDescription PathDescription = 4;
optional fixed64 PathOwner = 5;
optional fixed64 DEPRECATED_PathOwner = 5; // replaced by PathOwnerId
optional fixed64 PathId = 6;

optional string LastExistedPrefixPath = 7;
Expand Down

0 comments on commit 5ba8840

Please sign in to comment.