You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/03/12 18:15:27 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1025: Fix lgtm dead logic alerts

ctubbsii commented on a change in pull request #1025: Fix lgtm dead logic alerts
URL: https://github.com/apache/accumulo/pull/1025#discussion_r264818551
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
 ##########
 @@ -2630,18 +2630,6 @@ else if (memTable == getTabletMemory().getMemTable())
           rebuildReferencedLogs();
         }
 
-        if (numAdded > 1) {
-          // expect to add all or none
-          throw new IllegalArgumentException(
-              "Added subset of logs " + extent + " " + more + " " + currentLogs);
-        }
-
-        if (numContained > 1) {
-          // expect to contain all or none
-          throw new IllegalArgumentException(
-              "Other logs contained subset of logs " + extent + " " + more + " " + otherLogs);
-        }
-
         if (numAdded > 0 && numContained == 0) {
 
 Review comment:
   Now that the other conditions have been removed (because they can't happen), it seems the only valid values for these are `0` and `1`. If so, this code can be dramatically simplified if we change the type to `boolean` and use assignments to set the values directly, rather than `if` blocks.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services