[
https://issues.apache.org/jira/browse/HBASE-18042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011044#comment-16011044
]
Karan Mehta commented on HBASE-18042:
-------------------------------------
bq. We already have this field for branch-1.2.
I missed that. Sorry about it.
But the behavior of {{closeScanner}} is modified between 1.2 and 1.3. Although
we set {{more_results_in_region}} bit, we never close the scanner based on
that. I am not sure about how the golden behavior should be in such a case.
bq. IIRC, the problem is that the official hbase client implementation does not
handle {{more_results_in_region}} correctly which leads to one more request to
RS but get nothing. I think this is a bug?
Can you provide some more insight into this? I am not fully aware about this.
From what I understand, for 1.3, if there is an OpenScanRequest for a region
which returns all the results, then setting the {{more_results_in_region}} bit
should help client to save one RPC request for CloseScanner since the scanner
will be automatically closed on the server side. We do not get this advantage
in 1.2. If any external client reads the {{more_results_in_region}} bit and
doesn't send out the CloseScanRequest. then an open scanner will be lying
around on server side wasting the resources.
> Client Compatibility breaks between versions 1.2 and 1.3
> --------------------------------------------------------
>
> Key: HBASE-18042
> URL: https://issues.apache.org/jira/browse/HBASE-18042
> Project: HBase
> Issue Type: Bug
> Affects Versions: 1.3.1
> Reporter: Karan Mehta
> Assignee: Karan Mehta
>
> OpenTSDB uses AsyncHBase as its client, rather than using the traditional
> HBase Client. From version 1.2 to 1.3, the {{ClientProtos}} have been
> changed. Newer fields are added to {{ScanResponse}} proto.
> For a typical Scan request in 1.2, would require caller to make an
> OpenScanner Request, GetNextRows Request and a CloseScanner Request, based on
> {{more_rows}} boolean field in the {{ScanResponse}} proto.
> However, from 1.3, new parameter {{more_results_in_region}} was added, which
> limits the results per region. Therefore the client has to now manage sending
> all the requests for each region. Further more, if the results are exhausted
> from a particular region, the {{ScanResponse}} will set
> {{more_results_in_region}} to false, but {{more_results}} can still be true.
> Whenever the former is set to false, the {{RegionScanner}} will also be
> closed.
> OpenTSDB makes an OpenScanner Request and receives all its results in the
> first {{ScanResponse}} itself, thus creating a condition as described in
> above paragraph. Since {{more_rows}} is true, it will proceed to send next
> request at which point the {{RSRpcServices}} will throw
> {{UnknownScannerException}}. The protobuf client compatibility is maintained
> but expected behavior is modified.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)