Samarth Jain created PHOENIX-2487:
-------------------------------------
Summary: Use a completion service on the client to fetch scan
results
Key: PHOENIX-2487
URL: https://issues.apache.org/jira/browse/PHOENIX-2487
Project: Phoenix
Issue Type: Improvement
Reporter: Samarth Jain
In my testing I have seen instances where the scanners failed on the server
side (due to lease expiration errors), but the queries took much longer to
fail.
This is because after submitting the scan callable tasks to the Phoenix client
thread pool, we wait for the corresponding futures to complete in the same
order as we submitted the tasks. Instead, we should poll for the results as an
when they are available and then rejigger them in the order desired. Then in
such failure situations queries would fail much faster than they would have.
This would also help us to do a more eager cleanup of scan tasks corresponding
to failed queries that are queued and not yet kicked off.
A possible implementation to use here would be the CompletionService.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)