Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-1014

Log truncation takes a long time during catch-up if the initial position is very large

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.18.0
    • Fix Version/s: 0.17.0
    • Component/s: None
    • Labels:
      None

      Description

      in src/log/leveldb.cpp

      The while loop takes a long time if action.truncate().to() is very large.

      Try<Nothing> LevelDBStorage::persist(const Action& action)
      {
         ...
             leveldb::WriteBatch batch;
      
             // Add positions up to (but excluding) the truncate position to
             // the batch starting at the first position still in leveldb.
             uint64_t index = 0;
             while ((first + index) < action.truncate().to()) {
                batch.Delete(encode(first + index));
                index++;
             }
        ...
      }
      

        Attachments

          Activity

            People

            • Assignee:
              jieyu Jie Yu
              Reporter:
              jieyu Jie Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: