ctubbsii commented on code in PR #5873:
URL: https://github.com/apache/accumulo/pull/5873#discussion_r2338121804


##########
server/monitor/src/main/java/org/apache/accumulo/monitor/next/InformationFetcher.java:
##########
@@ -236,9 +236,9 @@ public void newConnectionEvent() {
   }
 
   // Protect against NPE and wait for initial data gathering
-  public SystemInformation getSummary() {
+  public SystemInformation getSummary() throws InterruptedException {
     while (summaryRef.get() == null) {
-      Thread.onSpinWait();
+      Thread.sleep(100);

Review Comment:
   I'd have to look at all the uses again, but my impression was that this 
triggered a lot of boilerplate in the endpoint code that could have been done 
here. You could just create a new smaller method called `getSummaryForEndpoint` 
with a javadoc that explains that it returns a 503 error message to the web 
client. If there's any other uses of `getSummary`, they can handle 
InterruptedException their own way.



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to