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

MaintenanceManager running_op_ count not decremented if MaintenanceOp::Prepare() fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.3.2, 1.5.0, 1.2.1, 1.4.1
    • None
    • None

    Description

      In MaintenanceManager::RunSchedulerThread(), an op gets selected, running_ops_ is incremented, and Prepare() is called on the op. If Prepare() returns false, the op isn't run, so running_ops_ never gets decremented. If Prepare() ever fails, then this could be a problem, as the maintenance manager compares running_ops_ to the number of operation threads to determine whether or not it can run another operation. Prepare generally doesn't fail, but if Tablet::AlterSchema() is called in between FlushMRSOp::UpdateStats() and FlushMRSOp::Prepare(), that is one instance where Prepare() could potentially fail.

      To fix, decrement running_ops_ in the codepath that follows from Prepare() failing.

      Attachments

        Issue Links

          Activity

            People

              dralves David Alves
              samuelokrent Samuel Okrent
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: