aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzalyalov <zalyalov@yandex-team.com>2023-10-16 11:13:52 +0300
committerzalyalov <zalyalov@yandex-team.com>2023-10-16 11:38:28 +0300
commit327d48079ec5b883bc34375f567f160adbbf07ed (patch)
tree4beac6922b7b6ee934c53f03b0ac6fd9098d8779
parente67e6141f5b8b06f53ba5ade8b6460cec0e387f2 (diff)
downloadydb-327d48079ec5b883bc34375f567f160adbbf07ed.tar.gz
more precharge in load everything tx KIKIMR-19657
-rw-r--r--ydb/core/mind/hive/tx__load_everything.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/ydb/core/mind/hive/tx__load_everything.cpp b/ydb/core/mind/hive/tx__load_everything.cpp
index 87feb4ab138..90c78d3df27 100644
--- a/ydb/core/mind/hive/tx__load_everything.cpp
+++ b/ydb/core/mind/hive/tx__load_everything.cpp
@@ -13,7 +13,7 @@ public:
TTxType GetTxType() const override { return NHive::TXTYPE_LOAD_EVERYTHING; }
bool Execute(TTransactionContext &txc, const TActorContext&) override {
- BLOG_D("THive::TTxLoadEverything::Execute");
+ BLOG_NOTICE("THive::TTxLoadEverything::Execute");
TAppData* appData = AppData();
TDomainsInfo* domainsInfo = appData->DomainsInfo.Get();
@@ -55,6 +55,9 @@ public:
auto domainsRowset = db.Table<Schema::SubDomain>().Select();
auto blockedOwnersRowset = db.Table<Schema::BlockedOwner>().Select();
auto tabletOwnersRowset = db.Table<Schema::TabletOwners>().Select();
+ auto nodeRowset = db.Table<Schema::Node>().Select();
+ auto configRowset = db.Table<Schema::State>().Select();
+ auto categoryRowset = db.Table<Schema::TabletCategory>().Select();
if (!tabletRowset.IsReady()
|| !tabletChannelRowset.IsReady()
|| !tabletChannelGenRowset.IsReady()
@@ -66,7 +69,10 @@ public:
|| !sequencesRowset.IsReady()
|| !domainsRowset.IsReady()
|| !blockedOwnersRowset.IsReady()
- || !tabletOwnersRowset.IsReady())
+ || !tabletOwnersRowset.IsReady()
+ || !nodeRowset.IsReady()
+ || !configRowset.IsReady()
+ || !categoryRowset.IsReady())
return false;
}
@@ -231,7 +237,7 @@ public:
}
}
- BLOG_D("THive::TTxLoadEverything loaded " << numSequences << " sequences");
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numSequences << " sequences");
auto tabletTypeAllowedMetrics = db.Table<Schema::TabletTypeMetrics>().Select();
if (!tabletTypeAllowedMetrics.IsReady())
@@ -267,7 +273,7 @@ public:
if (!domainRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numSubDomains << " subdomains");
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numSubDomains << " subdomains");
}
{
@@ -281,7 +287,7 @@ public:
if (!blockedOwnerRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numBlockedOwners << " blocked owners");
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numBlockedOwners << " blocked owners");
}
{
@@ -324,7 +330,7 @@ public:
if (!nodeRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numNodes << " nodes");
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numNodes << " nodes");
}
{
@@ -341,7 +347,7 @@ public:
if (!categoryRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numTabletCategories << " tablet categories");
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numTabletCategories << " tablet categories");
}
if (auto systemCategoryId = Self->CurrentConfig.GetSystemTabletCategoryId(); systemCategoryId != 0 && Self->TabletCategories.empty()) {
@@ -448,7 +454,7 @@ public:
if (!tabletRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numTablets << " tablets");
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numTablets << " tablets");
}
{
@@ -484,7 +490,7 @@ public:
if (!tabletChannelRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numTabletChannels << " tablet/channel pairs ("
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numTabletChannels << " tablet/channel pairs ("
<< numMissingTablets << " for missing tablets)");
}
@@ -516,14 +522,14 @@ public:
if (!tabletChannelGenRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numTabletChannelHistories << " tablet/channel history items ("
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numTabletChannelHistories << " tablet/channel history items ("
<< numMissingTablets << " for missing tablets)");
}
for (auto& [tabletId, tabletInfo] : Self->Tablets) {
tabletInfo.AcquireAllocationUnits();
}
- BLOG_D("THive::TTxLoadEverything initialized allocation units for " << Self->Tablets.size() << " tablets");
+ BLOG_NOTICE("THive::TTxLoadEverything initialized allocation units for " << Self->Tablets.size() << " tablets");
{
size_t numTabletFollowerGroups = 0;
@@ -563,7 +569,7 @@ public:
if (!tabletFollowerGroupRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numTabletFollowerGroups << " tablet follower groups ("
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numTabletFollowerGroups << " tablet follower groups ("
<< numMissingTablets << " for missing tablets)");
}
@@ -601,7 +607,7 @@ public:
if (!tabletFollowerRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numTabletFollowers << " tablet followers ("
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numTabletFollowers << " tablet followers ("
<< numMissingTablets << " for missing tablets)");
}
@@ -631,7 +637,7 @@ public:
if (!metricsRowset.Next())
return false;
}
- BLOG_D("THive::TTxLoadEverything loaded " << numMetrics << " metrics ("
+ BLOG_NOTICE("THive::TTxLoadEverything loaded " << numMetrics << " metrics ("
<< numMissingTablets << " for missing tablets)");
}
@@ -644,7 +650,7 @@ public:
++itNode;
}
}
- BLOG_D("THive::TTxLoadEverything deleted " << numDeletedNodes << " unnecessary nodes");
+ BLOG_NOTICE("THive::TTxLoadEverything deleted " << numDeletedNodes << " unnecessary nodes");
TTabletId nextTabletId = Max(maxTabletId + 1, Self->NextTabletId);
@@ -697,7 +703,7 @@ public:
}
void Complete(const TActorContext& ctx) override {
- BLOG_D("THive::TTxLoadEverything::Complete " << Self->DatabaseConfig.ShortDebugString());
+ BLOG_NOTICE("THive::TTxLoadEverything::Complete " << Self->DatabaseConfig.ShortDebugString());
i64 tabletsTotal = 0;
for (auto it = Self->Tablets.begin(); it != Self->Tablets.end(); ++it) {
++tabletsTotal;