Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16132

Scan does not return all the result when regionserver is busy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0, 1.1.6, 1.2.3, 2.0.0
    • Client
    • None
    • Reviewed

    Description

      We have find some corner case, when regionserver is busy and last a long time. Some scanner may return null even if they do not scan all data.
      We find in ScannerCallableWithReplicas there is a case do not handler correct, when cs.poll timeout and do not return any result , it is will return a null result, so scan get null result, and end the scan.

          try {
            Future<Pair<Result[], ScannerCallable>> f = cs.poll(timeout, TimeUnit.MILLISECONDS);
            if (f != null) {
              Pair<Result[], ScannerCallable> r = f.get(timeout, TimeUnit.MILLISECONDS);
              if (r != null && r.getSecond() != null) {
                updateCurrentlyServingReplica(r.getSecond(), r.getFirst(), done, pool);
              }
              return r == null ? null : r.getFirst(); // great we got an answer
            }
          } catch (ExecutionException e) {
            RpcRetryingCallerWithReadReplicas.throwEnrichedException(e, retries);
          } catch (CancellationException e) {
            throw new InterruptedIOException(e.getMessage());
          } catch (InterruptedException e) {
            throw new InterruptedIOException(e.getMessage());
          } catch (TimeoutException e) {
            throw new InterruptedIOException(e.getMessage());
          } finally {
            // We get there because we were interrupted or because one or more of the
            // calls succeeded or failed. In all case, we stop all our tasks.
            cs.cancelAll();
          }
          return null; // unreachable
       

      Attachments

        1. TestScanMissingData.java
          2 kB
          Yu Li
        2. HBASE-16132.patch
          1 kB
          Lijin Bin
        3. HBASE-16132_v3.patch
          2 kB
          Lijin Bin
        4. HBASE-16132_v3.patch
          2 kB
          Lijin Bin
        5. HBASE-16132_v2.patch
          2 kB
          Lijin Bin

        Issue Links

          Activity

            People

              binlijin Lijin Bin
              binlijin Lijin Bin
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: