[
https://issues.apache.org/jira/browse/MESOS-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jie Yu reassigned MESOS-1014:
-----------------------------
Assignee: Jie Yu
> 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
> Assignee: 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)