Skip to content

PHOENIX-6453 Possible ArrayIndexOutOfBoundsException while preparing … - #1220

Closed
chrajeshbabu wants to merge 2 commits into
apache:masterfrom
chrajeshbabu:master
Closed

PHOENIX-6453 Possible ArrayIndexOutOfBoundsException while preparing …#1220
chrajeshbabu wants to merge 2 commits into
apache:masterfrom
chrajeshbabu:master

Conversation

@chrajeshbabu

@chrajeshbabuchrajeshbabu commented May 4, 2021

Copy link
Copy Markdown
Contributor

…scan start key with multiple key range queries(Rajeshbabu)

The field position preparation logic from the slot spans is wrong so when there are mix of fixed length and variable length columns in different in lists scan key length coming wrong so getting AIOOB exception.

…scan start key with multiple key range queries(Rajeshbabu)
@stoty

stoty commented May 4, 2021

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec5m 31sDocker 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 5smaster passed
+0hbaserecompile24m 0sHBase recompiled.
+1 💚compile1m 5smaster passed
+1 💚checkstyle0m 42smaster passed
+1 💚javadoc0m 53smaster passed
+0 🆗spotbugs3m 21sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 49sthe patch passed
+0hbaserecompile20m 13sHBase recompiled.
+1 💚compile1m 3sthe patch passed
+1 💚javac1m 3sthe patch passed
-1 ❌checkstyle0m 42sphoenix-core: The patch generated 9 new + 698 unchanged - 5 fixed = 707 total (was 703)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 52sthe patch passed
+1 💚spotbugs3m 29sthe patch passed
_ Other Tests _
+1 💚unit120m 44sphoenix-core in the patch passed.
+1 💚asflicense0m 17sThe patch does not generate ASF License warnings.
180m 46s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1220/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1220
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux ff7ef1275cee 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 / 55aeb15
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-1220/1/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-1220/1/testReport/
Max. process+thread count6706 (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-1220/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.

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

The logic looks good, but I feel it could be made easier to read.

position[i] = bound == Bound.LOWER ? 0 : slots.get(i).size()-1;
KeyRange range = slots.get(i).get(position[i]);
Field field = schema.getField(i + slotSpan[i]);
slotEndingFieldPos = slotEndingFieldPos + slotSpan[i] + (i>0? 1: 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.

nit:

This is quite confusing : + (i>0? 1: 0); .

Can we increment slotEndingFieldPos at the end of the for cycle body instead?
Or just initialize slotEndingFieldPos to -1 , and increment it here unconditionally ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍🏼

@stotystoty 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 LGTM

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 7sDocker 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 💚mvninstall15m 32smaster passed
+0hbaserecompile22m 21sHBase recompiled.
+1 💚compile1m 6smaster passed
+1 💚checkstyle0m 51smaster passed
+1 💚javadoc0m 50smaster passed
+0 🆗spotbugs3m 3sphoenix-core in master has 965 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall8m 8sthe patch passed
+0hbaserecompile17m 33sHBase recompiled.
+1 💚compile1m 3sthe patch passed
+1 💚javac1m 3sthe patch passed
-1 ❌checkstyle0m 50sphoenix-core: The patch generated 5 new + 698 unchanged - 5 fixed = 703 total (was 703)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 51sthe patch passed
+1 💚spotbugs3m 18sthe patch passed
_ Other Tests _
-1 ❌unit115m 19sphoenix-core in the patch failed.
+1 💚asflicense0m 47sThe patch does not generate ASF License warnings.
169m 5s
ReasonTests
Failed junit testsphoenix.end2end.UpsertSelectIT
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1220/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1220
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux f94326a248ea 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 3231aad
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-1220/2/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1220/2/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-1220/2/testReport/
Max. process+thread count11527 (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-1220/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.

@stotystoty closed this Jun 1, 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

@chrajeshbabu@stoty@joshelser