[ 
https://issues.apache.org/jira/browse/HBASE-8420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13665729#comment-13665729
 ] 

Ted Yu commented on HBASE-8420:
-------------------------------

{code}
+        prefetchScanFuture.cancel(false);
+      }
+      prefetchScanFuture = null;
+      if (prefetchedResultSize > 0) {
+        globalPrefetchedResultSize.addAndGet(-prefetchedResultSize);
{code}
prefetchScanFuture.cancel() returns a boolean. I think the return value should 
be checked so that we know whether prefetchedResultSize should be deducted from 
globalPrefetchedResultSize.
{code}
+              return tmp; // Keep the prefetched results for late
{code}
'late' -> 'later'
{code}
+            // Reset rows for next prefetching
+            this.rows = rows;
{code}
What if tmp.results.size + scanResult.results.size() > this.rows ?
{code}
+        Thread.currentThread().interrupt();
+        throw new IOException("scan was interrupted", ie);
{code}
Please use InterruptedIOException above.
{code}
+            } catch (LeaseStillHeldException e) {
+              LOG.warn("THIS SHOULD NOT HAPPEN", e);
{code}
Looks like the log should be at error level.
{code}
+class ScanResult {
{code}
Maybe the above class can reside in HRegionServer ?
                
> Port  HBASE-6874  Implement prefetching for scanners from 0.89-fb
> -----------------------------------------------------------------
>
>                 Key: HBASE-8420
>                 URL: https://issues.apache.org/jira/browse/HBASE-8420
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>         Attachments: 0.94-8420_v1.patch, 0.94-8420_v2.patch, 
> trunk-8420_v1.patch, trunk-8420_v2.patch, trunk-8420_v3.patch, 
> trunk-8420_v4.patch, trunk-8420_v5.1.patch, trunk-8420_v5.patch, 
> trunk-8420_v6.patch
>
>
> This should help scanner performance.  We should have it in trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to