]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PrimaryLogPG: do not use approx_size() for log trimming 18338/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 17 Oct 2017 01:55:57 +0000 (09:55 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 17 Oct 2017 07:42:08 +0000 (15:42 +0800)
commit024b5bcbf0259eeecba234cff882564947c3a525
treebed8f0aeec3634ed65f1fcdf60f6886fa8fb8bff
parent3455a38f732df203d9a630f30e459a4c72e994e9
osd/PrimaryLogPG: do not use approx_size() for log trimming

There might be holes on log versions, thus the approx_size()
should (almost) always overestimate the actual number of log entries.
As a result, we might be at the risk of accessing violation
while searching for the oldest log entry to keep in the log list later.

Fix the above problem by counting the precise number of current
log entries instead.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PrimaryLogPG.cc