Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-7324

Archive the logs instead of deletion after distributed splitting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 0.94.3, 0.95.2
    • None
    • wal
    • None

    Description

      We should always move the logs to .oldlogs instead of deleting them directly.
      The negative effect of this bug may cause data-loss if we enabled replication.
      The below code is extracted from SplitLogManager#splitLogDistributed:

      for(Path logDir: logDirs){
            status.setStatus("Cleaning up log directory...");
            try {
              if (fs.exists(logDir) && !fs.delete(logDir, false)) {
                LOG.warn("Unable to delete log src dir. Ignoring. " + logDir);
              }
            } catch (IOException ioe) {
              FileStatus[] files = fs.listStatus(logDir);
              if (files != null && files.length > 0) {
                LOG.warn("returning success without actually splitting and " + 
                    "deleting all the log files in path " + logDir);
              } else {
                LOG.warn("Unable to delete log src dir. Ignoring. " + logDir, ioe);
              }
            }
            tot_mgr_log_split_batch_success.incrementAndGet();
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeason Jieshan Bean
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: