Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.18.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++; } ... }