[ 
https://issues.apache.org/jira/browse/MESOS-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13905820#comment-13905820
 ] 

Jie Yu commented on MESOS-1014:
-------------------------------

https://reviews.apache.org/r/18252/
https://reviews.apache.org/r/18261/

> Log truncation takes a long time during catch-up if the initial position is 
> very large
> --------------------------------------------------------------------------------------
>
>                 Key: MESOS-1014
>                 URL: https://issues.apache.org/jira/browse/MESOS-1014
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 0.18.0
>            Reporter: Jie Yu
>             Fix For: 0.18.0
>
>
> in src/log/leveldb.cpp
> The while loop takes a long time if action.truncate().to() is very large.
> {noformat}
> 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++;
>        }
>   ...
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to