You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Zuocheng Ren <re...@cs.utexas.edu> on 2012/03/20 04:56:08 UTC

Reproducing HBASE-4878 Master crash when splitting hlog may cause data loss

Hi all,
In one of a research project of my lab, I need to reproduce the bug in
HBASE-4878.
https://issues.apache.org/jira/browse/HBASE-4878
But when I put
archiveLogs(srcDir, corruptedLogs, processedLogs, oldLogDir, fs, conf);
before
splits = outputSink.finishWritingAndClose();
and injected code between the two statements to kill(-9) the master, the
data loss still cannot be reproduced.

I looked at the patch in the issue and thought the above change should be
the only thing to restore from current 0.92.0 release to reproduce the bug.

But I guess I am wrong at this point because the code snippet in issue
tracker is:

private List<Path> splitLog(final FileStatus[] logfiles) throws IOException {
 try {
  for (FileStatus log : logfiles) {
  parseHLog(in, logPath, entryBuffers, fs, conf, skipErrors);
 }
 archiveLogs(srcDir, corruptedLogs, processedLogs, oldLogDir, fs, conf);
 } finally {
      status.setStatus("Finishing writing output logs and closing down.");
      splits = outputSink.finishWritingAndClose();
    }
}

But what I found in the splitLog method right now is much more complex
than the above code snippet.


Any help is welcome! Thank you all in advance!