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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.18.0
    • 0.17.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: