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 @@ -3304,9 +3304,9 @@ int EventuallyPersistentStore::flushVBucket(uint16_t vbid) {
33043304 hrtime_t end = gethrtime ();
33053305 uint64_t trans_time = (end - flush_start) / 1000000 ;
33063306
3307- lastTransTimePerItem = (items_flushed == 0 ) ? 0 :
3308- static_cast <double >(trans_time) /
3309- static_cast <double >(items_flushed);
3307+ lastTransTimePerItem. store ( (items_flushed == 0 ) ? 0 :
3308+ static_cast <double >(trans_time) /
3309+ static_cast <double >(items_flushed) );
33103310 stats.cumulativeFlushTime .fetch_add (ep_current_time ()
33113311 - flush_start);
33123312 stats.flusher_todo .store (0 );
Original file line number Diff line number Diff line change @@ -712,7 +712,7 @@ class EventuallyPersistentStore {
712712 }
713713
714714 size_t getTransactionTimePerItem () {
715- return lastTransTimePerItem;
715+ return lastTransTimePerItem. load () ;
716716 }
717717
718718 bool isFlushAllScheduled () {
@@ -1029,7 +1029,7 @@ class EventuallyPersistentStore {
10291029 AtomicValue<size_t > replicaRatio;
10301030 } cachedResidentRatio;
10311031 size_t statsSnapshotTaskId;
1032- size_t lastTransTimePerItem;
1032+ AtomicValue< size_t > lastTransTimePerItem;
10331033 item_eviction_policy_t eviction_policy;
10341034
10351035 Mutex compactionLock;
You can’t perform that action at this time.
0 commit comments