[
https://issues.apache.org/jira/browse/MESOS-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jie Yu resolved MESOS-1014.
---------------------------
Resolution: Fixed
commit 919920329f9441fb125eecbeecabd48245aa2851
Author: Jie Yu <[email protected]>
Date: Tue Feb 18 22:23:40 2014 -0800
Added log storage test for testing truncation.
commit 07537b580a3befb51b3d4533ce9ed01b84943a7f
Author: Jie Yu <[email protected]>
Date: Tue Feb 18 16:29:56 2014 -0800
Revised the handling of truncation in leveldb to address the issue exposed
by log catch-up.
> 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)