[
https://issues.apache.org/jira/browse/HBASE-11736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096745#comment-14096745
]
Matteo Bertozzi commented on HBASE-11736:
-----------------------------------------
{quote}The default behavior is to require all regions of a table to coordinate
in order to
prevent writing to the table, and to perform a flush at the same time. This
causes the
table to be unavailable for writes while the snapshot is being taken.{quote}
There is no locking anywhere in snapshots.
Coordination is just the process of asking to each Region to perform the
snapshot operation and then report back once they are done.
The default behavior of snapshot is flushing (not locking), which means that
the data in the memstore at the moment of the snapshot operation on the region
will be included in the snapshot. but you still can write or read while the
snapshot operation is going on.
{quote}However, if your set-up can tolerate the possibility of some data not
being captured by the snapshot, you can use the <option>SKIP_FLUSH</option>
option of the snapshot command to disable locking and flushing while taking the
snapshot.{quote}
sort of ok, since there is no locking you don't really know which data is
present in the snapshot. "A snapshot is an row-consistent image of what was in
the table between the time you asked for the snapshot and the completion". Skip
flush will avoid to flush the memstore which means the data not flushed yet
will not be included in the snapshot (you don't have any way to know what).
just emphasize that the only difference is the memstore not flushed
{quote}hbase> snapshot 'mytable', 'snapshot123', 'SKIP_FLUSH'{quote}
That does not work, the correct one is:
{code}snapshot 'namespace:sourceTable', 'snapshotName', {SKIP_FLUSH =>
true}{code}
{quote}Using this option can result in data lost if you try to restore a
snapshot which is missing data that was written while the snapshot was
taken.{quote}
can you reword this avoiding the "can result in data lost". You don't lose any
data on restore.
Since there is no locking between the start and the end of the snapshot
operation, you can still insert data while the snapshot is in progress. The
snapshot is just a "snapshot at some point in time", so the data inserted on a
particular region after the snapshot was taken is not in the snapshot. With the
skip flush not only the data inserted after the snapshot operation, but all the
data in the memstore is not available.
> Document SKIP_FLUSH snapshot option
> -----------------------------------
>
> Key: HBASE-11736
> URL: https://issues.apache.org/jira/browse/HBASE-11736
> Project: HBase
> Issue Type: Sub-task
> Components: documentation, snapshots
> Reporter: Misty Stanley-Jones
> Assignee: Misty Stanley-Jones
> Fix For: 0.99.0, 0.94.21, 0.98.4
>
> Attachments: HBASE-11736.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)