pallavithegod commented on code in PR #3362:
URL: https://github.com/apache/hugegraph/pull/3362#discussion_r4306778209
##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/HeartbeatService.java:
##########
@@ -415,6 +451,29 @@ public void shutdown() {
}
}
+ private void reportOffline() {
+ if (fatalExitRequested.get() || storeInfo == null) {
+ return;
+ }
+ storeInfo.setState(Metapb.StoreState.Offline);
+ if (storeInfo.getId() == 0 || pdProvider == null ||
+ pdProvider.getPDClient() == null) {
+ return;
+ }
+ try {
+ // Preserve PD's current metadata, and never use Exiting for a
temporary restart.
+ var client = pdProvider.getPDClient();
+ client.getCache().removeStore(storeInfo.getId());
+ Metapb.Store current = client.getStore(storeInfo.getId());
+ if (current.getState() == Metapb.StoreState.Up) {
+
client.updateStore(current.toBuilder().setState(Metapb.StoreState.Offline).build());
Review Comment:
Fixed in 5511593ea: ReportStoreShutdown records temporary Offline without
the administrative readiness gate and preserves metadata and the existing
lease. The service regressions cover a non-OK cluster and the unchanged
administrative guard; all 33 focused cases and local gates pass, and this is
ready for re-review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]