From: Michal Schmidt Date: Fri, 19 Dec 2014 14:05:30 +0000 (+0100) Subject: journal: fix skipping of duplicate entries in iteration X-Git-Tag: v219~907 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=487d37209b30a536636c95479cfeba931fea25c5;hp=487d37209b30a536636c95479cfeba931fea25c5;p=elogind.git journal: fix skipping of duplicate entries in iteration I accidentally broke the detection of duplicate entries in 7943f42275 "journal: optimize iteration by returning previously found candidate entry". When we have a known location of a candidate entry, we must not return from next_beyond_location() immediately. We must go through the duplicates detection to make sure the candidate differs from the already iterated entry. This fix slows down iteration a bit, but it's still faster than it was before the rework. $ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null real 0m4.448s user 0m4.298s sys 0m0.149s (Compare with results from commit 7943f42275, where real was 5.3s before the rework.) ---