[
https://issues.apache.org/jira/browse/PHOENIX-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14610448#comment-14610448
]
Maryann Xue commented on PHOENIX-2074:
--------------------------------------
Still not able to repro. Found one suspicious point, though. Looking at the
stack trace, it seems to me that the RoundRobinIterator.close() method is
calling itself recursively in an endless loop. And at
RoundRobinResultIterator.java:243, an instance of the inner class
RoundRobinIterator is created wrapping another RoundRobinIterator instance. I
guess it would make more sense to change it like this:
{code}
@@ -240,7 +240,7 @@ public class RoundRobinResultIterator implements
ResultIterator {
for (Future<Tuple> future : futures) {
Tuple tuple = future.get();
if (tuple != null) {
- results.add(new RoundRobinIterator(openIterators.get(i),
tuple));
+ results.add(new
RoundRobinIterator(openIterators.get(i).delegate, tuple));
} else {
// Underlying scanner is exhausted. So close it.
openIterators.get(i).close();
{code}
Not sure if this would fix the problem, but let me know if the change looks OK,
[~jamestaylor], [~samarthjain].
> StackOverflowError for hash join with round robin
> -------------------------------------------------
>
> Key: PHOENIX-2074
> URL: https://issues.apache.org/jira/browse/PHOENIX-2074
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
>
> EVENTS Table has id,article, and more columns. Id is the primay key
> MAPPING Table has id,article,category columns. Id is the primay key
> There is index on article column of both the tables.
> Below is the query.
> select count(MAPPING.article) as cnt,MAPPING.category from EVENTS
> join
> MAPPING on MAPPING.article = EVENTS.article
> group by category order by cnt ;
> Here's the stack trace:
> {code}
> Error: Encountered exception in sub plan [0] execution. (state=,code=0)
> java.sql.SQLException: Encountered exception in sub plan [0] execution.
> at
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:156)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:251)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:241)
> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:240)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1250)
> at sqlline.Commands.execute(Commands.java:822)
> at sqlline.Commands.sql(Commands.java:732)
> at sqlline.SqlLine.dispatch(SqlLine.java:808)
> at sqlline.SqlLine.begin(SqlLine.java:681)
> at sqlline.SqlLine.start(SqlLine.java:398)
> at sqlline.SqlLine.main(SqlLine.java:292)
> Caused by: java.lang.StackOverflowError
> at
> org.apache.phoenix.iterate.RoundRobinResultIterator$RoundRobinIterator.close(RoundRobinResultIterator.java:298)
> at
> org.apache.phoenix.iterate.RoundRobinResultIterator$RoundRobinIterator.close(RoundRobinResultIterator.java:298)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)