dlmarion commented on code in PR #5376:
URL: https://github.com/apache/accumulo/pull/5376#discussion_r1987964709
##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -1259,18 +1247,71 @@ boolean canSuspendTablets() {
// setting.
return
getConfiguration().getBoolean(Property.MANAGER_METADATA_SUSPENDABLE);
}
- });
+ };
+ watchers.add(metadataTableTGW);
- watchers
- .add(new TabletGroupWatcher(this, this.rootTabletStore,
watchers.get(1), managerMetrics) {
+ final TabletGroupWatcher rootTableTGW =
+ new TabletGroupWatcher(this, this.rootTabletStore, watchers.get(1),
managerMetrics) {
@Override
boolean canSuspendTablets() {
// Never allow root tablet to enter suspended state.
return false;
}
- });
- for (TabletGroupWatcher watcher : watchers) {
- watcher.start();
+ };
+ watchers.add(rootTableTGW);
+
+ while (isUpgrading()) {
+ UpgradeStatus currentStatus = upgradeCoordinator.getStatus();
+ if (currentStatus == UpgradeStatus.FAILED || currentStatus ==
UpgradeStatus.COMPLETE) {
+ break;
+ }
+ switch (currentStatus) {
+ case UPGRADED_METADATA:
+ if (rootTableTGW.getState() == NEW) {
+ rootTableTGW.start();
+ }
+ if (metadataTableTGW.getState() == NEW) {
+ metadataTableTGW.start();
+ }
+ if (userTableTGW.getState() == NEW) {
+ userTableTGW.start();
+ }
+ break;
+ case UPGRADED_ROOT:
+ if (rootTableTGW.getState() == NEW) {
+ rootTableTGW.start();
+ }
+ if (metadataTableTGW.getState() == NEW) {
+ metadataTableTGW.start();
+ }
+ break;
+ case UPGRADED_ZOOKEEPER:
+ // Start processing the root table
+ if (rootTableTGW.getState() == NEW) {
+ rootTableTGW.start();
+ }
+ break;
+ case FAILED:
+ case COMPLETE:
+ case INITIAL:
+ default:
+ break;
+ }
+ }
Review Comment:
Added sleep in f789a8a
--
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]