[
https://issues.apache.org/jira/browse/IMPALA-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16921071#comment-16921071
]
Sahil Takiar commented on IMPALA-558:
-
The frequency of this issue should be significantly reduced when result
spooling is enabled. The call to {{BufferedPlanRootSink::Send}} no longer
blocks waiting for a corresponding call to {{GetNext}}, so {{FlushFinal}} is
called immediately after sending the last batch.
However, even with result spooling, the issue could still occur because
{{Send}} releases the lock and then {{FlushFinal}} re-acquires it before
setting the sender state. So it is possible that the client calls {{GetNext}}
before {{FlushFinal}} can set the state to EOS.
This could be fixed by re-factoring the {{PlanRootSink}} interface so that
{{Send}} takes in an {{eos}} flag. This would allow {{Send}} to know if the
batch being sent, is the last one. It could then set the {{sender_state_}}
flag. However, I'm not sure its worth the effort.
> HS2::FetchResults sets hasMoreRows in many cases where no more rows are to be
> returned
> --
>
> Key: IMPALA-558
> URL: https://issues.apache.org/jira/browse/IMPALA-558
> Project: IMPALA
> Issue Type: Sub-task
> Components: Clients
>Affects Versions: Impala 1.1
>Reporter: Henry Robinson
>Priority: Minor
> Labels: query-lifecycle
>
> The first call to {{FetchResults}} always sets {{hasMoreRows}} even when 0
> rows should be returned. The next call correctly sets {{hasMoreRows ==
> False}}. The upshot is there's always an extra round-trip, although
> correctness isn't affected.
> {code}
> execute_statement_req = TCLIService.TExecuteStatementReq()
> execute_statement_req.sessionHandle = resp.sessionHandle
> execute_statement_req.statement = "SELECT COUNT(*) FROM
> functional.alltypes WHERE 1 = 2"
> execute_statement_resp =
> self.hs2_client.ExecuteStatement(execute_statement_req)
>
> fetch_results_req = TCLIService.TFetchResultsReq()
> fetch_results_req.operationHandle = execute_statement_resp.operationHandle
> fetch_results_req.maxRows = 100
> fetch_results_resp = self.hs2_client.FetchResults(fetch_results_req)
>
> assert not fetch_results_resp.hasMoreRows # Fails
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org