You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/04/15 00:28:54 UTC

[GitHub] [phoenix] kadirozde commented on a change in pull request #760: PHOENIX-5840: IndexTool inline verification should not fail with -v O…

kadirozde commented on a change in pull request #760: PHOENIX-5840: IndexTool inline verification should not fail with -v O…
URL: https://github.com/apache/phoenix/pull/760#discussion_r408512320
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/coprocessor/IndexToolVerificationResult.java
 ##########
 @@ -413,13 +413,8 @@ public void update(Cell cell) {
     }
 
     public boolean isVerificationFailed(IndexTool.IndexVerifyType verifyType) {
-        if (verifyType == IndexTool.IndexVerifyType.BEFORE || verifyType == IndexTool.IndexVerifyType.NONE) {
+        if (verifyType == IndexTool.IndexVerifyType.BEFORE || verifyType == IndexTool.IndexVerifyType.NONE || verifyType == IndexTool.IndexVerifyType.ONLY) {
             return false;
-        } else if (verifyType == IndexTool.IndexVerifyType.ONLY) {
-            if (getBefore().getInvalidIndexRowCount() + getBefore().getMissingIndexRowCount() +
-                before.getBeyondMaxLookBackInvalidIndexRowCount() + before.getBeyondMaxLookBackMissingIndexRowCount() > 0) {
-                return true;
-            }
         } else if (verifyType == IndexTool.IndexVerifyType.BOTH || verifyType == IndexTool.IndexVerifyType.AFTER) {
 
 Review comment:
   I suggest the following instead of above
   public boolean isVerificationFailed() {
     if (getAfter().getInvalidIndexRowCount() + getAfter().getMissingIndexRowCount() +
                   after.getBeyondMaxLookBackInvalidIndexRowCount() + after.getBeyondMaxLookBackMissingIndexRowCount() > 0) {
                   return true;
               }
     return false;
   }

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