keith-turner commented on code in PR #3893:
URL: https://github.com/apache/accumulo/pull/3893#discussion_r1394377027


##########
server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletGoalState.java:
##########
@@ -145,6 +146,10 @@ public String getResourceGroup() {
         }
       }
 
+      if (VolumeUtil.needsVolumeReplacement(params.getVolumeReplacements(), 
tm)) {

Review Comment:
   The reason I called it twice was because I think having the goal state 
determined in a single place in the code makes it easier to review and 
understand.  The goal state used to be determined in a multiple places in the 
code (spread between manager and TGW code) and it was harder to understand and 
reason about the goal state (needed to know all the places in the code that 
determined the goal state).  Would like to keep it in a single place for this 
reason.  Once the manager has done its first pass the volume checks will always 
be super quick because the list of replacements is empty, so its will not 
matter that its called twice then.  Also needsVolumeReplacement method was 
optimized to do less allocation, probably making it faster.



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