Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1039

Prevent users from setting --log_min_segments_to_retain to 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Feature Complete
    • None
    • log
    • None

    Description

      If a user sets min log retention to 0, and the tablet quiesces, it may be possible that we shut down with only an empty log file. This would make it impossible to start back up and we need to prevent this configuration.

      See TabletBootstrap::Bootstrap() in tablet_bootstrap.cc around this code block for the reasoning:

        if (has_blocks && !needs_recovery) {
          return Status::IllegalState(Substitute("Tablet: $0 had rowsets but no log "
                                                 "segments could be found.",
                                                 tablet_id));
        }
      

      Not to mention that we will have no way of knowing what the next index in the log should be, so we can't safely do anything Rafty like participate in leader elections, etc.

      Attachments

        Activity

          People

            tlipcon Todd Lipcon
            mpercy Mike Percy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: