]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not spam system log on successful read_log
authorSage Weil <sage@inktank.com>
Wed, 6 Feb 2013 17:02:54 +0000 (09:02 -0800)
committerSage Weil <sage@inktank.com>
Sun, 10 Feb 2013 04:40:10 +0000 (20:40 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 1948a02bc888fadafc29cf2e6f0a92129c68fd4c)

src/osd/PG.cc

index 666f0946d5a246470975cc9b2946f4fa6abd7afc..5ed13685df0ec87d555fc093ce7acbea80393fbf 100644 (file)
@@ -2649,7 +2649,8 @@ void PG::read_state(ObjectStore *store, bufferlist &bl)
   try {
     ostringstream oss;
     read_log(store, coll, log_oid, info, ondisklog, log, missing, oss, this);
-    osd->clog.error() << oss;
+    if (oss.str().length())
+      osd->clog.error() << oss;
   }
   catch (const buffer::error &e) {
     string cr_log_coll_name(get_corrupt_pg_log_name());