]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/FileStore: fix sync_pause_max_lat which should not be inced
authorhaoyixing <haoyixing@kuaishou.com>
Wed, 17 Mar 2021 07:25:21 +0000 (07:25 +0000)
committerhaoyixing <haoyixing@kuaishou.com>
Thu, 18 Mar 2021 09:52:10 +0000 (09:52 +0000)
Max lat of sync pause should be set when greater value comes, not inced to it.

Signed-off-by: haoyixing <haoyixing@kuaishou.com>
src/os/filestore/FileStore.cc

index dc304659b1801da526bb3eccc4343397978da6cb..4324b37038cb0094a18cd4eb73129bc96fe872e1 100644 (file)
@@ -4271,7 +4271,7 @@ void FileStore::sync_entry()
       dout(10) << __FUNC__ << ": commit took " << lat << ", interval was " << dur << dendl;
       utime_t max_pause_lat = logger->tget(l_filestore_sync_pause_max_lat);
       if (max_pause_lat < utime_t{dur - lat}) {
-        logger->tinc(l_filestore_sync_pause_max_lat, dur - lat);
+        logger->tset(l_filestore_sync_pause_max_lat, utime_t{dur - lat});
       }
 
       logger->inc(l_filestore_commitcycle);