Skip to content
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

speed up tables manager in schemeshard #7229

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions ydb/core/tx/schemeshard/olap/manager/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ void TTablesStorage::OnRemoveObject(const TPathId& pathId, TColumnTableInfo::TPt
}
}

const std::set<NKikimr::TPathId>& TTablesStorage::GetTablesWithTiering(const TString& tieringId) const {
const THashSet<TPathId>& TTablesStorage::GetTablesWithTiering(const TString& tieringId) const {
auto it = PathsByTieringId.find(tieringId);
if (it != PathsByTieringId.end()) {
return it->second;
} else {
return Default<std::set<TPathId>>();
return Default<THashSet<TPathId>>();
}
}

Expand Down
4 changes: 2 additions & 2 deletions ydb/core/tx/schemeshard/olap/manager/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace NKikimr::NSchemeShard {
class TTablesStorage {
private:
THashMap<TPathId, TColumnTableInfo::TPtr> Tables;
THashMap<TString, std::set<TPathId>> PathsByTieringId;
THashMap<TString, THashSet<TPathId>> PathsByTieringId;
THashMap<ui64, TColumnTablesLayout::TTableIdsGroup> TablesByShard;

void OnAddObject(const TPathId& pathId, TColumnTableInfo::TPtr object);
Expand All @@ -20,7 +20,7 @@ class TTablesStorage {

TColumnTablesLayout GetTablesLayout(const std::vector<ui64>& tabletIds) const;

const std::set<TPathId>& GetTablesWithTiering(const TString& tieringId) const;
const THashSet<TPathId>& GetTablesWithTiering(const TString& tieringId) const;

class TTableReadGuard {
protected:
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/tiering/rule/ss_fetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void TFetcherCheckUserTieringPermissions::DoProcess(NSchemeShard::TSchemeShard&
} else {
bool denied = false;
for (auto&& i : TieringRuleIds) {
const std::set<TPathId>& pathIds = schemeShard.ColumnTables.GetTablesWithTiering(i);
const auto& pathIds = schemeShard.ColumnTables.GetTablesWithTiering(i);
for (auto&& pathId : pathIds) {
auto path = NSchemeShard::TPath::Init(pathId, &schemeShard);
if (!path.IsResolved() || path.IsUnderDeleting() || path.IsDeleted()) {
Expand Down
Loading