Skip to content

Commit a87900c

Browse files
speed up tables manager in schemeshard (#7229)
1 parent 49a8f16 commit a87900c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ydb/core/tx/schemeshard/olap/manager/manager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ void TTablesStorage::OnRemoveObject(const TPathId& pathId, TColumnTableInfo::TPt
2929
}
3030
}
3131

32-
const std::set<NKikimr::TPathId>& TTablesStorage::GetTablesWithTiering(const TString& tieringId) const {
32+
const THashSet<TPathId>& TTablesStorage::GetTablesWithTiering(const TString& tieringId) const {
3333
auto it = PathsByTieringId.find(tieringId);
3434
if (it != PathsByTieringId.end()) {
3535
return it->second;
3636
} else {
37-
return Default<std::set<TPathId>>();
37+
return Default<THashSet<TPathId>>();
3838
}
3939
}
4040

ydb/core/tx/schemeshard/olap/manager/manager.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace NKikimr::NSchemeShard {
99
class TTablesStorage {
1010
private:
1111
THashMap<TPathId, TColumnTableInfo::TPtr> Tables;
12-
THashMap<TString, std::set<TPathId>> PathsByTieringId;
12+
THashMap<TString, THashSet<TPathId>> PathsByTieringId;
1313
THashMap<ui64, TColumnTablesLayout::TTableIdsGroup> TablesByShard;
1414

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

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

23-
const std::set<TPathId>& GetTablesWithTiering(const TString& tieringId) const;
23+
const THashSet<TPathId>& GetTablesWithTiering(const TString& tieringId) const;
2424

2525
class TTableReadGuard {
2626
protected:

ydb/core/tx/tiering/rule/ss_fetcher.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void TFetcherCheckUserTieringPermissions::DoProcess(NSchemeShard::TSchemeShard&
1717
} else {
1818
bool denied = false;
1919
for (auto&& i : TieringRuleIds) {
20-
const std::set<TPathId>& pathIds = schemeShard.ColumnTables.GetTablesWithTiering(i);
20+
const auto& pathIds = schemeShard.ColumnTables.GetTablesWithTiering(i);
2121
for (auto&& pathId : pathIds) {
2222
auto path = NSchemeShard::TPath::Init(pathId, &schemeShard);
2323
if (!path.IsResolved() || path.IsUnderDeleting() || path.IsDeleted()) {

0 commit comments

Comments
 (0)