dlmarion commented on code in PR #6153:
URL: https://github.com/apache/accumulo/pull/6153#discussion_r2854410252


##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -932,18 +939,26 @@ public void run() {
     // when a hot-standby
     //
     // Start the Manager's Fate Service
-    fateServiceHandler = new FateServiceHandler(this);
-    managerClientHandler = new ManagerClientServiceHandler(this);
+    FateService.Iface fateServiceHandler =
+        HighlyAvailableServiceWrapper.service(new FateServiceHandler(this), 
this);
+    ManagerClientService.Iface managerClientHandler =
+        HighlyAvailableServiceWrapper.service(new 
ManagerClientServiceHandler(this), this);
     compactionCoordinator = new CompactionCoordinator(this, this::fateClient);
+    CompactionCoordinatorService.Iface wrappedCoordinator =
+        
HighlyAvailableServiceWrapper.service(compactionCoordinator.getThriftService(), 
this);
 
     var processor = ThriftProcessorTypes.getManagerTProcessor(this, 
fateServiceHandler,
-        compactionCoordinator.getThriftService(), managerClientHandler, 
getContext());
+        wrappedCoordinator, managerClientHandler, getContext());
     try {
       updateThriftServer(() -> {

Review Comment:
   The Manager is the only process that passes `false` for the last argument so 
that it can delay starting the ThriftServer until after the Manager is fully 
up. I think with these changes that last parameter can be removed from the 
method.



##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -932,18 +939,26 @@ public void run() {
     // when a hot-standby
     //
     // Start the Manager's Fate Service
-    fateServiceHandler = new FateServiceHandler(this);
-    managerClientHandler = new ManagerClientServiceHandler(this);
+    FateService.Iface fateServiceHandler =
+        HighlyAvailableServiceWrapper.service(new FateServiceHandler(this), 
this);
+    ManagerClientService.Iface managerClientHandler =
+        HighlyAvailableServiceWrapper.service(new 
ManagerClientServiceHandler(this), this);
     compactionCoordinator = new CompactionCoordinator(this, this::fateClient);
+    CompactionCoordinatorService.Iface wrappedCoordinator =
+        
HighlyAvailableServiceWrapper.service(compactionCoordinator.getThriftService(), 
this);
 
     var processor = ThriftProcessorTypes.getManagerTProcessor(this, 
fateServiceHandler,
-        compactionCoordinator.getThriftService(), managerClientHandler, 
getContext());
+        wrappedCoordinator, managerClientHandler, getContext());
     try {
       updateThriftServer(() -> {
         return TServerUtils.createThriftServer(context, getBindAddress(),
             Property.MANAGER_CLIENTPORT, processor, "Manager", null, 
Property.MANAGER_MINTHREADS,
             Property.MANAGER_MINTHREADS_TIMEOUT, Property.MANAGER_THREADCHECK);
       }, false);
+      // Now that the Manager is up, start the ThriftServer
+      Objects.requireNonNull(getThriftServerAddress(), "Thrift Server Address 
should not be null");
+      getThriftServerAddress().startThriftServer("Manager Client Service 
Handler");

Review Comment:
   If the suggestion above is implemented, then this line can be removed.



-- 
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]

Reply via email to