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

Ineffective config check in BackupLogCleaner#getDeletableFiles()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-alpha-4, 2.0.0
    • None
    • None
    • Reviewed

    Description

      Here is related code:

          if (this.getConf() == null || !BackupManager.isBackupEnabled(getConf())) {
            LOG.warn("Backup is not enabled. Check your " + BackupRestoreConstants.BACKUP_ENABLE_KEY
                + " setting");
            return files;
          }
      

      However, in setConf() we don't store the Configuration where backup is disabled:

        public void setConf(Configuration config) {
          // If backup is disabled, keep all members null
          if (!config.getBoolean(BackupRestoreConstants.BACKUP_ENABLE_KEY,
            BackupRestoreConstants.BACKUP_ENABLE_DEFAULT)) {
            LOG.warn("Backup is disabled - allowing all wals to be deleted");
            return;
          }
      

      This means that once config with backup enabled is remembered, it won't go to disabled state.

      Attachments

        Issue Links

          Activity

            People

              reidchan Reid Chan
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: