saintstack commented on a change in pull request #2413:
URL: https://github.com/apache/hbase/pull/2413#discussion_r490405980



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -2429,15 +2431,11 @@ public FlushResultImpl flushcache(List<byte[]> families,
         if (!writestate.flushing && writestate.writesEnabled) {
           this.writestate.flushing = true;
         } else {
-          if (LOG.isDebugEnabled()) {
-            LOG.debug("NOT flushing memstore for region " + this
-                + ", flushing=" + writestate.flushing + ", writesEnabled="
-                + writestate.writesEnabled);
-          }
-          String msg = "Not flushing since "
-              + (writestate.flushing ? "already flushing"
-              : "writes not enabled");
+          String msg = "NOT flushing " + this + "; " +

Review comment:
       The log message was being constructed anyways, whether debug or not to 
put into the status.abort. The if debug was sort of silly.
   
    @@ -2429,15 +2431,11 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
             if (!writestate.flushing && writestate.writesEnabled) {
               this.writestate.flushing = true;
             } else {
    -          if (LOG.isDebugEnabled()) {
    -            LOG.debug("NOT flushing memstore for region " + this
    -                + ", flushing=" + writestate.flushing + ", writesEnabled="
    -                + writestate.writesEnabled);
    -          }
    -          String msg = "Not flushing since "
    -              + (writestate.flushing ? "already flushing"
    -              : "writes not enabled");
    +          String msg = "NOT flushing " + this + "; " +
    +            (writestate.flushing ? "already flushing": "writes are not 
enabled");
    +          LOG.debug(msg);
               status.abort(msg);




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to