[
https://issues.apache.org/jira/browse/HBASE-10514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931481#comment-13931481
]
Anoop Sam John commented on HBASE-10514:
----------------------------------------
{code}
- long flushsize = this.memstoreSize.get();
+ long totalFlushableSize = 0;
status.setStatus("Preparing to flush by snapshotting stores");
List<StoreFlushContext> storeFlushCtxs = new
ArrayList<StoreFlushContext>(stores.size());
long flushSeqId = -1L;
@@ -1630,6 +1649,7 @@ public class HRegion implements HeapSize { // , Writable{
}
for (Store s : stores.values()) {
+ totalFlushableSize += s.getFlushableSize();
...
- this.addAndGetGlobalMemstoreSize(-flushsize);
+ this.addAndGetGlobalMemstoreSize(-totalFlushableSize);
{code}
So when one snapshot was already in place in MemStore and we again undergo a
flush request, now we dont decrease by the begin time memstoreSize. But we
check with all MemStores.
Now the MemStore returns the previous snapshot's size when one was in place.
The snapshot() to MemStore won't take new snaphot when already a snapshot is in
place.
This can make we decrease the memstore's snapshot size 2 times from this global
memstore size? (When a flush requested while another was in progress)
> Forward port HBASE-10466, possible data loss when failed flushes
> ----------------------------------------------------------------
>
> Key: HBASE-10514
> URL: https://issues.apache.org/jira/browse/HBASE-10514
> Project: HBase
> Issue Type: Bug
> Reporter: stack
> Assignee: stack
> Priority: Critical
> Fix For: 0.96.2, 0.98.1, 0.99.0, 0.94.18
>
> Attachments: 10514.txt, 10514v2.txt, 10514v3.txt, 10514v3.txt,
> 10514v4.txt
>
>
> Critical data loss issues that we need to ensure are not in branches beyond
> 0.89fb. Assigning myself.
--
This message was sent by Atlassian JIRA
(v6.2#6252)