Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # dev - .oldlogs in region dir


Copy link to this message
-
.oldlogs in region dir
Lars George 2011-07-05, 06:39
Hi,

Could someone confirm that we dropped the replay of the .oldlogs in the
region directory because it is not needed anymore? Before the master rewrite
we were, just as now, creating the region and for a brief period it had its
own log directory, the .oldlogs under the region directory. The
HRegion.initialize() would replay it in case an edit to the region arrived
in between. It would then also remove it:

  public void initialize(Path initialFiles, final Progressable reporter)
  throws IOException {
    Path oldLogFile = new Path(regiondir, HREGION_OLDLOGFILE_NAME);
...
    // Play log if one.  Delete when done.
    doReconstructionLog(oldLogFile, minSeqIdToRecover, maxSeqId, reporter);
    if (fs.exists(oldLogFile)) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Deleting old log file: " + oldLogFile);
      }
      fs.delete(oldLogFile, false);
    }
...

Now we still create that directory, but the above code has been dropped.
Only the recovered.edits is replayed instead while the .oldlogs now hang
around. I am not even sure when they may contain an entry, but if they don't
then we can either do not use "<regiondir>/.oldlogs", but point it to the
new "<regiondir>/.tmp" - or we can add a unconditional delete in the
initialize as before.

Create a JIRA for this?

Lars