Skip to content

PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result. - #1161

Merged
lhofhansl merged 1 commit into
apache:masterfrom
lhofhansl:6408
Mar 10, 2021
Merged

PHOENIX-6408 LIMIT on local index query with uncovered columns in the WHERE returns wrong result.#1161
lhofhansl merged 1 commit into
apache:masterfrom
lhofhansl:6408

Conversation

@lhofhansl

@lhofhansllhofhansl commented Mar 10, 2021

Copy link
Copy Markdown
Contributor

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

I added extra tests for this.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec6m 42sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe 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 💚mvninstall17m 3smaster passed
+0hbaserecompile23m 59sHBase recompiled.
+1 💚compile1m 4smaster passed
+1 💚checkstyle0m 51smaster passed
+1 💚javadoc0m 53smaster passed
+0 🆗spotbugs3m 18sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 51sthe patch passed
+0hbaserecompile20m 2sHBase recompiled.
+1 💚compile1m 4sthe patch passed
+1 💚javac1m 4sthe patch passed
-1 ❌checkstyle0m 50sphoenix-core: The patch generated 11 new + 1205 unchanged - 1 fixed = 1216 total (was 1206)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 52sthe patch passed
+1 💚spotbugs3m 27sthe patch passed
_ Other Tests _
-1 ❌unit106m 49sphoenix-core in the patch failed.
+1 💚asflicense0m 33sThe patch does not generate ASF License warnings.
170m 1s
ReasonTests
Failed junit testsphoenix.end2end.PointInTimeScanQueryIT
SubsystemReport/Notes
DockerClientAPI=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#1161
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux 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 toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 5d78494
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://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
unithttps://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 Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/1/testReport/
Max. process+thread count10407 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/1/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

return next;
}
}
if (extraLimit >= 0 && --extraLimit == 0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@lhofhansllhofhanslMar 10, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lhofhansl

Copy link
Copy Markdown
ContributorAuthor

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.

@lhofhansl

Copy link
Copy Markdown
ContributorAuthor

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

@kadirozdekadirozde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, Thanks

@lhofhansl

Copy link
Copy Markdown
ContributorAuthor

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

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 11sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe 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 💚mvninstall17m 24smaster passed
+0hbaserecompile24m 15sHBase recompiled.
+1 💚compile1m 4smaster passed
+1 💚checkstyle0m 50smaster passed
+1 💚javadoc0m 50smaster passed
+0 🆗spotbugs3m 17sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 55sthe patch passed
+0hbaserecompile21m 8sHBase recompiled.
+1 💚compile1m 4sthe patch passed
+1 💚javac1m 4sthe patch passed
-1 ❌checkstyle0m 51sphoenix-core: The patch generated 11 new + 1205 unchanged - 1 fixed = 1216 total (was 1206)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 51sthe patch passed
+1 💚spotbugs3m 29sthe patch passed
_ Other Tests _
+1 💚unit125m 33sphoenix-core in the patch passed.
+1 💚asflicense0m 15sThe patch does not generate ASF License warnings.
182m 37s
SubsystemReport/Notes
DockerClientAPI=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#1161
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux 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 toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / b6b41ce
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://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 Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/2/testReport/
Max. process+thread count10426 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1161/2/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@lhofhansl
lhofhansl merged commit dcf3bf9 into apache:masterMar 10, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@lhofhansl@stoty@kadirozde