You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2016/10/24 06:16:58 UTC

[jira] [Comment Edited] (HBASE-16931) Setting cell's seqId to zero in compaction flow might cause RS down.

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

ramkrishna.s.vasudevan edited comment on HBASE-16931 at 10/24/16 6:16 AM:
--------------------------------------------------------------------------

Ok. So just saw that in Writer
{code}
    if (lastCell != null) {
      int keyComp = comparator.compareKeyIgnoresMvcc(lastCell, cell);

      if (keyComp > 0) {
        throw new IOException("Added a key not lexically larger than"
            + " previous. Current cell = " + cell + ", lastCell = " + lastCell);
      } else if (keyComp == 0) {
        isDuplicateKey = true;
      }
    }
{code}
So we ignore the mvcc. So this issue will not happen in writer.


was (Author: ram_krish):
Ok. So just saw that in Writer
{code}
{code}

> Setting cell's seqId to zero in compaction flow might cause RS down.
> --------------------------------------------------------------------
>
>                 Key: HBASE-16931
>                 URL: https://issues.apache.org/jira/browse/HBASE-16931
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 2.0.0
>            Reporter: binlijin
>            Assignee: binlijin
>            Priority: Critical
>         Attachments: HBASE-16931-master.patch
>
>
> Compactor#performCompaction
>       do {
>         hasMore = scanner.next(cells, scannerContext);
>         // output to writer:
>         for (Cell c : cells) {
>           if (cleanSeqId && c.getSequenceId() <= smallestReadPoint) {
>             CellUtil.setSequenceId(c, 0);
>           }
>           writer.append(c);
>         }
>         cells.clear();
>       } while (hasMore);
> scanner.next will choose at most "hbase.hstore.compaction.kv.max" kvs, the last cell still reference by StoreScanner.prevCell, so if cleanSeqId is called when the scanner.next call StoreScanner.checkScanOrder may throw exception and cause regionserver down.



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