hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <sunyu1...@sina.com>
Subject 回复:[jira] [Updated] (HBASE-16643) Reverse scanner heap creation may not allow MSLAB closure due to improper ref counting of segments
Date Fri, 23 Sep 2016 05:28:41 GMT
              String msg = "Results sent from server=" + noOfResults + ". But only got " +
i                + " results completely at client. Resetting the scanner to scan again.";
             LOG.error(msg);              throw new DoNotRetryIOException(msg);          
 }          } catch (IOException ioe) {            // We are getting IOE while retrieving
the cells for Results.            // We have to scan for the same results again. Throwing
DNRIOE as a client retry on the            // same scanner will result in OutOfOrderScannerNextException
           LOG.error("Exception while reading cells from result."              + "Resetting
the scanner to scan again.", ioe);            throw new DoNotRetryIOException("Resetting the
scanner.", ioe);          }          cells.add(cellScanner.current());          System.out.println("ResponseConverter.getResults(1)--cells
== "+ cells + "--j == " + j + "---noOfCells == " + noOfCells);        }        results[i]
= Result.create(cells, null, response.getStale(), isPartial);        System.out.println("ResponseConverter.getResults(2)--cells
== "+ cells + "--results[i] == " + results[i] + "---noOfCells == " + noOfCells);      } else
{        // Result is pure pb.        results[i] = ProtobufUtil.toResult(response.getResults(i));
       System.out.println("ResponseConverter.getResults(3)--results == " + results[i] + "--i
== " + i);      }    }    return results; thank you very much, anoop, do you want to see this
code, the exception should occur on the red mark line.
----- 原始邮件 -----
发件人:"ramkrishna.s.vasudevan (JIRA)" <jira@apache.org>
收件人:issues@hbase.apache.org
主题:[jira] [Updated] (HBASE-16643) Reverse scanner heap creation may not allow MSLAB
closure due to improper ref counting of segments
日期:2016年09月23日 13点25分


     [ https://issues.apache.org/jira/browse/HBASE-16643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ramkrishna.s.vasudevan updated HBASE-16643:
-------------------------------------------
    Status: Open  (was: Patch Available)
> Reverse scanner heap creation may not allow MSLAB closure due to improper ref counting
of segments
> --------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-16643
>                 URL: https://issues.apache.org/jira/browse/HBASE-16643
>             Project: HBase
>          Issue Type: Bug
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16643.patch, HBASE-16643_1.patch, HBASE-16643_2.patch, HBASE-16643_3.patch,
HBASE-16643_4.patch, HBASE-16643_5.patch
>
>
> In the reverse scanner case,
> While doing 'initBackwardHeapIfNeeded' in MemstoreScanner for setting the backward heap,
we do a 
> {code}
> if ((backwardHeap == null) && (forwardHeap != null)) {
>         forwardHeap.close();
>         forwardHeap = null;
>         // before building the heap seek for the relevant key on the scanners,
>         // for the heap to be built from the scanners correctly
>         for (KeyValueScanner scan : scanners) {
>           if (toLast) {
>             res |= scan.seekToLastRow();
>           } else {
>             res |= scan.backwardSeek(cell);
>           }
>         }
> {code}
> forwardHeap.close(). This would internally decrement the MSLAB ref counter for the current
active segment and snapshot segment.
> When the scan is actually closed again we do close() and that will again decrement the
count. Here chances are there that the count would go negative and hence the actual MSLAB
closure that checks for refCount==0 will fail. Apart from this, when the refCount becomes
0 after the firstClose if any other thread requests to close the segment, then we will end
up in corrupted segment because the segment could be put back to the MSLAB pool. 
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message