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

Duo Zhang commented on HBASE-17177:
-----------------------------------

Oh I made a mistake... Even minor compaction could also reclaim the delete 
cells, the difference of major compaction is that it can reclaim the delete 
marker itself...

So in general, we need to record a mvcc below which we may delete some cells 
and you may not read all the cells. And when a region is newly opened, we need 
to freeze this value for a small amount(maybe the scanner TTL as [~yangzhe1991] 
proposed above), either by disable compaction or set KeepDeleteCells to true 
when compaction.

Thanks.

> Compaction can break the region/row level atomic when scan even if we pass 
> mvcc to client
> -----------------------------------------------------------------------------------------
>
>                 Key: HBASE-17177
>                 URL: https://issues.apache.org/jira/browse/HBASE-17177
>             Project: HBase
>          Issue Type: Sub-task
>          Components: scan
>            Reporter: Duo Zhang
>             Fix For: 2.0.0, 1.4.0
>
>
> We know that major compaction will actually delete the cells which are 
> deleted by a delete marker. In order to give a consistent view for a scan, we 
> need to use a map to track the read points for all scanners for a region, and 
> the smallest one will be used for a compaction. For all delete markers whose 
> mvcc is greater than this value, we will not use it to delete other cells.
> And the problem for a scan restart after region move is that, the new RS does 
> not have the information of the scanners opened at the old RS before the 
> client sends scan requests to the new RS which means the read points map is 
> incomplete and the smallest read point maybe greater than the correct value. 
> So if a major compaction happens at that time, it may delete some cells which 
> should be kept.



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

Reply via email to