[
https://issues.apache.org/jira/browse/HBASE-10514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13932852#comment-13932852
]
Lars Hofhansl commented on HBASE-10514:
---------------------------------------
lgtm
This is a bit scary:
{code}
+ int flushCount = 0;
+ while (this.getMemstoreSize().get() > 0) {
+ try {
+ if (flushCount++ > 0) {
+ LOG.info("Running extra flush (carrying snapshot?) " + this);
+ }
+ internalFlushcache(status);
+ } catch (IOException ioe) {
+ status.setStatus("Failed flush " + this + ", putting online
again");
+ synchronized (writestate) {
+ writestate.writesEnabled = true;
+ }
+ // Have to throw to upper layers. I can't abort server from here.
+ throw ioe;
+ }
+ }
{code}
We better be sure we never get the accounting wrong, or we'll see an endless
loop. Will the loop ever have more than two iterations?
If not, we might want to limit the number of iterations to two
{{for (int flushCount = 0; flushCount < 2 && this.getMemstoreSize().get() > 0;
flushCount++)}}
or something like that...?
> 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)