You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (JIRA)" <ji...@apache.org> on 2018/01/03 08:54:00 UTC

[jira] [Comment Edited] (HBASE-17177) Compaction can break the region/row level atomic when scan even if we pass mvcc to client

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

Duo Zhang edited comment on HBASE-17177 at 1/3/18 8:53 AM:
-----------------------------------------------------------

Do not get enough time to do this...

The reason we need this is that, when updating meta, we may use batchMutate to make sure that the operations on multiple rows are atomic, for example, when splitting or merging table. But when scanning, we can only guarantee row level atomicity, which may lead to inconsistent result.

I think a temporary maybe that, introduce a flag for the ClientScanner to disable restart of a remote scanner, if we hit an exception which indicate that we need to restart a remote scanner, then we just fail the scan and tell the upper layer. We can enable this flag when doing critical meta scanning.

Thanks.


was (Author: apache9):
Do not get enough time to do this...

The reason we need this is that, when updating meta, we may use batchMutate to make sure that the operations on multiple rows are atomic, for example, we splitting or merging table. But when scanning, we can only guarantee row level atomicity, which may lead to inconsistent result.

I think a temporary maybe that, introduce a flag for the ClientScanner to disable restart of a remote scanner, if we hit an exception which indicate that we need to restart a remote scanner, then we just fail the scan and tell the upper layer. We can enable this flag when doing critical meta scanning.

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
>            Priority: Critical
>             Fix For: 3.0.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.4.14#64029)