aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxenoxeno <xeno@ydb.tech>2022-08-09 19:13:52 +0300
committerxenoxeno <xeno@ydb.tech>2022-08-09 19:13:52 +0300
commit75014a3ad930bfd11ec9f17a5262d16349e4e83e (patch)
tree43ac24f9645ffc4611a6c9e5a85237b52b815a57
parentcda58c7091b309ad8be1f5f095666cc2a222d9e1 (diff)
downloadydb-75014a3ad930bfd11ec9f17a5262d16349e4e83e.tar.gz
replace kill with restart
-rw-r--r--ydb/core/tablet/tablet_list_renderer.cpp2
-rw-r--r--ydb/core/tablet/tablet_monitoring_proxy.cpp33
-rw-r--r--ydb/core/tablet_flat/tablet_flat_executed.cpp2
3 files changed, 25 insertions, 12 deletions
diff --git a/ydb/core/tablet/tablet_list_renderer.cpp b/ydb/core/tablet/tablet_list_renderer.cpp
index ad36f12a29..8c30effc8b 100644
--- a/ydb/core/tablet/tablet_list_renderer.cpp
+++ b/ydb/core/tablet/tablet_list_renderer.cpp
@@ -154,7 +154,7 @@ void TTabletListRenderer::RenderTableBody(TStringStream& str,
if (filterInfo.FilterNodeId != 0)
str << "&filter_node_id=" << filterInfo.FilterNodeId;
str << "\">"
- << "<span class=\"glyphicon glyphicon-remove\" title=\"Kill Tablet\"/>"
+ << "<span class=\"glyphicon glyphicon-remove\" title=\"Restart Tablet\"/>"
<< "</span></a>";
}
}
diff --git a/ydb/core/tablet/tablet_monitoring_proxy.cpp b/ydb/core/tablet/tablet_monitoring_proxy.cpp
index 7f1ba12829..fd927d89f0 100644
--- a/ydb/core/tablet/tablet_monitoring_proxy.cpp
+++ b/ydb/core/tablet/tablet_monitoring_proxy.cpp
@@ -227,6 +227,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
cgi = &msg->Request.GetParams();
}
+ // remove later
if (cgi->Has("KillTabletID")) {
const ui64 tabletId = TryParseTabletId(cgi->Get("KillTabletID"));
if (tabletId) {
@@ -235,6 +236,18 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
return;
}
}
+ //
+
+ // temporary copy-paste
+ if (cgi->Has("RestartTabletID")) {
+ const ui64 tabletId = TryParseTabletId(cgi->Get("RestartTabletID"));
+ if (tabletId) {
+ ctx.Register(CreateTabletKiller(tabletId));
+ ctx.Send(ev->Sender, new NMon::TEvHttpInfoRes("<meta http-equiv=\"refresh\" content=\"0; tablets\" />"));
+ return;
+ }
+ }
+ //
bool hasFollowerParam = cgi->Has("FollowerID");
if (hasFollowerParam) {
@@ -296,7 +309,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\"/>"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << schemeRootTabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << schemeRootTabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
}
for (auto hi : di.second->HiveUids) {
@@ -309,7 +322,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
}
for (auto si : di.second->StateStorageGroups) {
@@ -322,7 +335,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
tabletId = NKikimr::MakeCmsID(si);
TABLER() {
@@ -333,7 +346,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
tabletId = NKikimr::MakeNodeBrokerID(si);
TABLER() {
@@ -344,7 +357,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
tabletId = NKikimr::MakeTenantSlotBrokerID(si);
TABLER() {
@@ -355,7 +368,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
tabletId = NKikimr::MakeConsoleID(si);
TABLER() {
@@ -366,7 +379,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
}
for (auto tabletId : di.second->Coordinators) {
@@ -378,7 +391,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
}
for (auto tabletId : di.second->Mediators) {
@@ -390,7 +403,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
}
for (auto tabletId : di.second->TxAllocators) {
@@ -402,7 +415,7 @@ TTabletMonitoringProxyActor::Handle(NMon::TEvHttpInfo::TPtr &ev, const TActorCon
<< "<span class=\"glyphicon glyphicon-tasks\""
<< " title=\"State Storage\" />"
<< "</a>";}
- TABLED() {str << "<a href='tablets?KillTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Kill Tablet'/></a>";}
+ TABLED() {str << "<a href='tablets?RestartTabletID=" << tabletId << "'><span class='glyphicon glyphicon-remove' title='Restart Tablet'/></a>";}
}
}
}
diff --git a/ydb/core/tablet_flat/tablet_flat_executed.cpp b/ydb/core/tablet_flat/tablet_flat_executed.cpp
index 4b3c15490c..3d46f6ffda 100644
--- a/ydb/core/tablet_flat/tablet_flat_executed.cpp
+++ b/ydb/core/tablet_flat/tablet_flat_executed.cpp
@@ -227,7 +227,7 @@ void TTabletExecutedFlat::RenderHtmlPage(NMon::TEvRemoteHttpInfo::TPtr &ev, cons
DIV_CLASS("col-md-12") {str << "<a href=\"tablets?SsId=" << TabletID() << "\">State Storage</a>";}
}
DIV_CLASS("row") {
- DIV_CLASS("col-md-12") {str << "<a href=\"tablets?KillTabletID=" << TabletID() << "\">Kill</a>";}
+ DIV_CLASS("col-md-12") {str << "<a href=\"tablets?RestartTabletID=" << TabletID() << "\">Restart</a>";}
}
}