From: Jianpeng Ma Date: Wed, 6 Jul 2016 09:43:37 +0000 (+0800) Subject: os/bluestore/BlueFS: don't inc l_bluefs_files_written_wal if overwrite. X-Git-Tag: v11.0.1~90^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=14f117a92df0df0bbd5ed5fecf369be7f739659c;p=ceph.git os/bluestore/BlueFS: don't inc l_bluefs_files_written_wal if overwrite. Because rocksdb now use journal recycling. So we can use this perfcounter to judge whether this feature work. We hope after some time, rocksdb don't create new wal log instead of using old log. Signed-off-by: Jianpeng Ma --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index dbfd59bdbac..8334087da83 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1530,7 +1530,7 @@ int BlueFS::open_for_write( if (0 == filename.compare(filename.length() - 4, 4, ".log")) { (*h)->writer_type = BlueFS::WRITER_WAL; - if (logger) { + if (logger && !overwrite) { logger->inc(l_bluefs_files_written_wal); } } else if (0 == filename.compare(filename.length() - 4, 4, ".sst")) {