[
https://issues.apache.org/jira/browse/HBASE-10087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13849215#comment-13849215
]
Nicolas Liochon commented on HBASE-10087:
-----------------------------------------
Sorry for the delay.
Theoretically, we have an issue:
{code}
@Override
public void prepare() {
memstore.snapshot();
this.snapshot = memstore.getSnapshot();
this.snapshotTimeRangeTracker = memstore.getSnapshotTimeRangeTracker();
}
{code}
w/o a lock, we could have an inconsistency between the snapshot and the
snapshotTimeRangeTracker.
As well, we could have an inconsistency in memstore.snapshot();
But it seems it cannot happen, because:
Store#snaphot is called only in the tests.
Store#prepare is called with the write lock on the HRegion.
The functions that will modify the store also have the read lock on HRegion, so
we can't be inconsistent in practice.
This said, adding the lock in prepare() would be more consistent imho. I would
propose to add it on trunk.
> Store should be locked during a memstore snapshot
> -------------------------------------------------
>
> Key: HBASE-10087
> URL: https://issues.apache.org/jira/browse/HBASE-10087
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.98.0, 0.96.1, 0.94.14
> Reporter: Nicolas Liochon
> Assignee: Nicolas Liochon
> Fix For: 0.98.0, 0.96.1, 0.94.15
>
> Attachments: 10079.v1.patch
>
>
> regression from HBASE-9963, found while looking at HBASE-10079.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)