aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxenoxeno <xeno@ydb.tech>2022-08-31 11:57:53 +0300
committerxenoxeno <xeno@ydb.tech>2022-08-31 11:57:53 +0300
commit840b01c288815c4c21bb7aa8a65c204a97f17a85 (patch)
treec77090c25a0ba2f3f12841d53e6428279919476a
parent5bab410d7788ca1548c742d56affc7cd02ab561f (diff)
downloadydb-840b01c288815c4c21bb7aa8a65c204a97f17a85.tar.gz
improve a little monitoring and logs for NBS tablets
-rw-r--r--ydb/core/mind/hive/hive_impl.cpp4
-rw-r--r--ydb/core/mind/hive/monitoring.cpp12
2 files changed, 14 insertions, 2 deletions
diff --git a/ydb/core/mind/hive/hive_impl.cpp b/ydb/core/mind/hive/hive_impl.cpp
index 2c4fdbfe3bb..1283ed19831 100644
--- a/ydb/core/mind/hive/hive_impl.cpp
+++ b/ydb/core/mind/hive/hive_impl.cpp
@@ -439,6 +439,10 @@ void THive::Handle(TEvPrivate::TEvBootTablets::TPtr&) {
if (!tablet.InitiateBlockStorage(sideEffects, std::numeric_limits<ui32>::max())) {
DeleteTabletWithoutStorage(&tablet);
}
+ } else if (tablet.IsLockedToActor()) {
+ // we are wating for a lock
+ } else if (tablet.IsExternalBoot()) {
+ // we are wating for external boot request
} else if (tablet.IsStopped() && tablet.State == ETabletState::Stopped) {
ReportStoppedToWhiteboard(tablet);
BLOG_D("Report tablet " << tablet.ToString() << " as stopped to Whiteboard");
diff --git a/ydb/core/mind/hive/monitoring.cpp b/ydb/core/mind/hive/monitoring.cpp
index cc3152f9145..414d8f769de 100644
--- a/ydb/core/mind/hive/monitoring.cpp
+++ b/ydb/core/mind/hive/monitoring.cpp
@@ -255,10 +255,10 @@ public:
for (const auto& tabletIdx : tabletIdIndex) {
TTabletInfo& x = *tabletIdx.second;
if (BadOnly) {
- if (x.IsAlive() || x.GetLeader().IsExternalBoot()) {
+ if (x.IsAlive()) {
continue;
}
- if (x.IsLeader() && x.AsLeader().Type == TTabletTypes::BlockStoreVolume && x.IsStopped()) {
+ if (x.IsLeader() && (x.AsLeader().IsLockedToActor() || x.AsLeader().IsExternalBoot())) {
continue;
}
}
@@ -1120,6 +1120,10 @@ public:
++runningTablets;
++tabletsByNodeByType[pr.second.NodeId][GetTabletType(pr.second.Type)];
}
+ if (pr.second.IsLockedToActor()) {
+ ++runningTablets;
+ ++tabletsByNodeByType[pr.second.LockedToActor.NodeId()][GetTabletType(pr.second.Type)];
+ }
for (const auto& sl : pr.second.Followers) {
if (sl.IsRunning()){
++runningTablets;
@@ -1763,6 +1767,10 @@ public:
++runningTablets;
++tabletsByNodeByType[pr.second.NodeId][TTxMonEvent_Landing::GetTabletType(pr.second.Type)];
}
+ if (pr.second.IsLockedToActor()) {
+ ++runningTablets;
+ ++tabletsByNodeByType[pr.second.LockedToActor.NodeId()][TTxMonEvent_Landing::GetTabletType(pr.second.Type)];
+ }
for (const auto& sl : pr.second.Followers) {
if (sl.IsRunning()) {
++runningTablets;