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 2021/03/10 03:37:47 UTC

[GitHub] [phoenix] lhofhansl opened a new pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

lhofhansl opened a new pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161


   See description in the jira.
   The fix is relatively straight forward, if not particularly pretty:
   - don't enforce the limit via a filter
   - instead count the rows after the extraWhere filter has run for uncovered local index WHERE clauses
   


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



[GitHub] [phoenix] lhofhansl commented on pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
lhofhansl commented on pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#issuecomment-795837711


   Updated as per @kadirozde's suggestion, which also fixes the test failures.


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



[GitHub] [phoenix] lhofhansl merged pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
lhofhansl merged pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161


   


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



[GitHub] [phoenix] lhofhansl commented on a change in pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
lhofhansl commented on a change in pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#discussion_r591747849



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -240,6 +245,9 @@ public boolean nextRaw(List<Cell> result) throws IOException {
                     return next;
                 }
             }
+            if (extraLimit >= 0 && --extraLimit == 0) {

Review comment:
       Oh. You are right. We're not building the right tuple in this case if we have a tuple projector.
   In fact this caused PointInTimeScanQueryIT to fail.




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



[GitHub] [phoenix] stoty commented on pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
stoty commented on pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#issuecomment-794958780


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   6m 42s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -1 :x: |  test4tests  |   0m  0s |  The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.  |
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  17m  3s |  master passed  |
   | +0 |  hbaserecompile  |  23m 59s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  4s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 51s |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 53s |  master passed  |
   | +0 :ok: |  spotbugs  |   3m 18s |  phoenix-core in master has 959 extant spotbugs warnings.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   9m 51s |  the patch passed  |
   | +0 |  hbaserecompile  |  20m  2s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  4s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  4s |  the patch passed  |
   | -1 :x: |  checkstyle  |   0m 50s |  phoenix-core: The patch generated 11 new + 1205 unchanged - 1 fixed = 1216 total (was 1206)  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  the patch passed  |
   | +1 :green_heart: |  spotbugs  |   3m 27s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 106m 49s |  phoenix-core in the patch failed.  |
   | +1 :green_heart: |  asflicense  |   0m 33s |  The patch does not generate ASF License warnings.  |
   |  |   | 170m  1s |   |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | phoenix.end2end.PointInTimeScanQueryIT |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/phoenix/pull/1161 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile |
   | uname | Linux dfc0ef6c9cde 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev/phoenix-personality.sh |
   | git revision | master / 5d78494 |
   | Default Java | Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08 |
   | checkstyle | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/1/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt |
   | unit | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/1/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/1/testReport/ |
   | Max. process+thread count | 10407 (vs. ulimit of 30000) |
   | modules | C: phoenix-core U: phoenix-core |
   | Console output | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/1/console |
   | versions | git=2.7.4 maven=3.3.9 spotbugs=4.1.3 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [phoenix] lhofhansl commented on pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
lhofhansl commented on pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#issuecomment-795801501


   I'm looking into the PointInTimeLimitedIT failures. They look pertinent.
   In the worst case we can move this issue to 5.1.2 or even 5.2.0.


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



[GitHub] [phoenix] lhofhansl commented on a change in pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
lhofhansl commented on a change in pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#discussion_r591719122



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -240,6 +245,9 @@ public boolean nextRaw(List<Cell> result) throws IOException {
                     return next;
                 }
             }
+            if (extraLimit >= 0 && --extraLimit == 0) {

Review comment:
       It does not matter as long as this is after the local index extra where filtering (and there are no other exit points after this). I wanted to isolate that to local indexing only, to not affect the other code paths.
   




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



[GitHub] [phoenix] lhofhansl commented on a change in pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
lhofhansl commented on a change in pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#discussion_r591719122



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -240,6 +245,9 @@ public boolean nextRaw(List<Cell> result) throws IOException {
                     return next;
                 }
             }
+            if (extraLimit >= 0 && --extraLimit == 0) {

Review comment:
       It does not matter as long as this is after the local index extra where filtering. I wanted to isolate that to local indexing only, to not affect the other code paths.




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



[GitHub] [phoenix] stoty commented on pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
stoty commented on pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#issuecomment-796111323


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 11s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -1 :x: |  test4tests  |   0m  0s |  The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.  |
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  17m 24s |  master passed  |
   | +0 |  hbaserecompile  |  24m 15s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  4s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 50s |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 50s |  master passed  |
   | +0 :ok: |  spotbugs  |   3m 17s |  phoenix-core in master has 959 extant spotbugs warnings.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   9m 55s |  the patch passed  |
   | +0 |  hbaserecompile  |  21m  8s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  4s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  4s |  the patch passed  |
   | -1 :x: |  checkstyle  |   0m 51s |  phoenix-core: The patch generated 11 new + 1205 unchanged - 1 fixed = 1216 total (was 1206)  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  javadoc  |   0m 51s |  the patch passed  |
   | +1 :green_heart: |  spotbugs  |   3m 29s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 125m 33s |  phoenix-core in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 15s |  The patch does not generate ASF License warnings.  |
   |  |   | 182m 37s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/phoenix/pull/1161 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile |
   | uname | Linux 723631e213cb 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev/phoenix-personality.sh |
   | git revision | master / b6b41ce |
   | Default Java | Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08 |
   | checkstyle | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/2/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/2/testReport/ |
   | Max. process+thread count | 10426 (vs. ulimit of 30000) |
   | modules | C: phoenix-core U: phoenix-core |
   | Console output | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/2/console |
   | versions | git=2.7.4 maven=3.3.9 spotbugs=4.1.3 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [phoenix] lhofhansl commented on pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
lhofhansl commented on pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#issuecomment-795854725


   Thanks! I'll await the next test run and then merge.


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



[GitHub] [phoenix] kadirozde commented on a change in pull request #1161: PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.

Posted by GitBox <gi...@apache.org>.
kadirozde commented on a change in pull request #1161:
URL: https://github.com/apache/phoenix/pull/1161#discussion_r591104351



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -240,6 +245,9 @@ public boolean nextRaw(List<Cell> result) throws IOException {
                     return next;
                 }
             }
+            if (extraLimit >= 0 && --extraLimit == 0) {

Review comment:
       Should not this check be at the end of this method just before it returns?




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