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


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java:
##########
@@ -394,6 +402,23 @@ private static long jitter() {
         * TabletServer.TIME_BETWEEN_LOCATOR_CACHE_CLEARS);
   }
 
+  public Optional<Semaphore> getSemaphore() {
+    int configuredWriteThreadsMax =
+        
getServerConfig().getConfiguration().getCount(Property.TSERV_WRITE_THREADS_MAX);
+    if (configuredWriteThreadsMax == MAX_WRITE_THREADS_DEFAULT) {
+      return Optional.empty();

Review Comment:
   Yeah, but if the default is changed... then the semantics change. That only 
works because the default is `0`. That's a very roundabout way of comparing to 
`0`. We shouldn't care if it's equal to the default... we should care if it's 
equal to `0`, regardless of what the default is.



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