File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2769,9 +2769,9 @@ int EventuallyPersistentStore::flushVBucket(uint16_t vbid) {
27692769 uint64_t commit_time = (end - start) / 1000000 ;
27702770 uint64_t trans_time = (end - flush_start) / 1000000 ;
27712771
2772- lastTransTimePerItem = (items_flushed == 0 ) ? 0 :
2773- static_cast <double >(trans_time) /
2774- static_cast <double >(items_flushed);
2772+ lastTransTimePerItem. store ( (items_flushed == 0 ) ? 0 :
2773+ static_cast <double >(trans_time) /
2774+ static_cast <double >(items_flushed) );
27752775 stats.commit_time .store (commit_time);
27762776 stats.cumulativeCommitTime .fetch_add (commit_time);
27772777 stats.cumulativeFlushTime .fetch_add (ep_current_time ()
Original file line number Diff line number Diff line change @@ -625,7 +625,7 @@ class EventuallyPersistentStore {
625625 }
626626
627627 size_t getTransactionTimePerItem () {
628- return lastTransTimePerItem;
628+ return lastTransTimePerItem. load () ;
629629 }
630630
631631 bool isFlushAllScheduled () {
@@ -878,7 +878,7 @@ class EventuallyPersistentStore {
878878 AtomicValue<size_t > replicaRatio;
879879 } cachedResidentRatio;
880880 size_t statsSnapshotTaskId;
881- size_t lastTransTimePerItem;
881+ AtomicValue< size_t > lastTransTimePerItem;
882882 item_eviction_policy_t eviction_policy;
883883
884884 Mutex compactionLock;
You can’t perform that action at this time.
0 commit comments