[
https://issues.apache.org/jira/browse/PHOENIX-1670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14325448#comment-14325448
]
Lars Hofhansl commented on PHOENIX-1670:
----------------------------------------
HBase removes the lease before a next() in order to avoid expiring the lease
while the server is actually working.
It does not do that before postScannerOpen. So if we do all the work there the
lease can expire even though we're working on it.
preScannerNext(...) is called after the lease was removed, and so that would be
a better place.
The perf hit is curious. Scanner open is an RPC call (and for aggregate it does
a lot of work), is that done asynchronously in Phoenix? If so, the earlier we
do that, the better. Could that be the reason?
> Investigate lease timeout on aggregate queries
> ----------------------------------------------
>
> Key: PHOENIX-1670
> URL: https://issues.apache.org/jira/browse/PHOENIX-1670
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
>
> In theory, we shouldn't hit a lease timeout for aggregate queries, because we
> chunk up the scan on the client side to manageable chunks. However, I believe
> [~mujtabachohan] has seen this occurring. Another curious issue is that
> unless we open the scanner when the iterator is created, aggregate scans take
> a perf hit which I don't completely understand. Another thing that
> [~lhofhansl] noticed was that running the scan on the region server during
> the post scanner open hook could be problematic. We might need to run the
> scan instead on the first next() call we get from the client instead.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)