mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
Remove running truncation code twice
Summary: D16096960 accidentally caused the truncation code to be run twice (once inline and once via a function code), this shouldn't cause any difference in outcome but is unnecessary. Reviewed By: strager Differential Revision: D16508798 fbshipit-source-id: 12781aee98e70e5105c5476d29cf5cdd1e31062d
This commit is contained in:
parent
b998c78386
commit
36696fe637
@ -90,13 +90,6 @@ void Journal::addDelta(std::unique_ptr<JournalDelta>&& delta) {
|
||||
|
||||
// Check memory before adding the new delta to make sure we always
|
||||
// have at least one delta (other than when the journal starts up)
|
||||
while (!deltaState->deltas.empty() && deltaState->stats &&
|
||||
deltaState->stats->memoryUsage > deltaState->memoryLimit) {
|
||||
deltaState->stats->entryCount--;
|
||||
deltaState->stats->memoryUsage -=
|
||||
deltaState->deltas.front().estimateMemoryUsage();
|
||||
deltaState->deltas.pop_front();
|
||||
}
|
||||
truncateIfNecessary(deltaState);
|
||||
|
||||
// We will compact the delta if possible. We can compact the delta if it is
|
||||
|
Loading…
Reference in New Issue
Block a user