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

Phil Yang commented on HBASE-15378:
-----------------------------------

We will continue the loop if it is heartbeat and cache is empty. If cache is 
not empty, we can return cached data to user.
{code}
if (callable.isHeartbeatMessage()) {
        if (cache.size() > 0) {
          // Caller of this method just wants a Result. If we see a heartbeat 
message, it means
          // processing of the scan is taking a long time server side. Rather 
than continue to
          // loop until a limit (e.g. size or caching) is reached, break out 
early to avoid causing
          // unnecesary delays to the caller
          if (LOG.isTraceEnabled()) {
            LOG.trace("Heartbeat message received and cache contains Results." 
+ " Breaking out of scan loop");
          }
          break;
        }
        continue;
      }
{code}


> Scanner can not handle a heartbeat message with no results
> ----------------------------------------------------------
>
>                 Key: HBASE-15378
>                 URL: https://issues.apache.org/jira/browse/HBASE-15378
>             Project: HBase
>          Issue Type: Bug
>          Components: dataloss, Scanners
>    Affects Versions: 1.2.0, 1.1.3
>            Reporter: Phil Yang
>            Assignee: Phil Yang
>            Priority: Critical
>         Attachments: HBASE-15378-v1.txt, HBASE-15378-v2.txt, 
> HBASE-15378-v3.txt
>
>
> When a RS scanner get a TIME_LIMIT_REACHED_MID_ROW state, they will stop 
> scanning and send back what it has read to client and mark the message as a 
> heartbeat message. If there is no cell has been read, it will be an empty 
> response. 
> However, ClientScanner only handles the situation that the client gets an 
> empty heartbeat and its cache is not empty. If the cache is empty too, it 
> will be regarded as end-of-region and open a new scanner for next region.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to