@@ -442,7 +442,7 @@ ENGINE_ERROR_CODE DcpProducer::step(struct dcp_message_producers* producers) {
442442        delete  resp;
443443    }
444444
445-     lastSendTime =  ep_current_time ();
445+     lastSendTime. store ( ep_current_time (), std::memory_order_relaxed );
446446    return  (ret == ENGINE_SUCCESS) ? ENGINE_WANT_MORE : ret;
447447}
448448
@@ -608,7 +608,8 @@ void DcpProducer::addStats(ADD_STAT add_stat, const void *c) {
608608    addStat (" items_sent"  , getItemsSent (), add_stat, c);
609609    addStat (" items_remaining"  , getItemsRemaining (), add_stat, c);
610610    addStat (" total_bytes_sent"  , getTotalBytes (), add_stat, c);
611-     addStat (" last_sent_time"  , lastSendTime, add_stat, c);
611+     addStat (" last_sent_time"  , lastSendTime.load (std::memory_order_relaxed),
612+             add_stat, c);
612613    addStat (" noop_enabled"  , noopCtx.enabled , add_stat, c);
613614    addStat (" noop_wait"  , noopCtx.pendingRecv , add_stat, c);
614615    addStat (" priority"  , priority.c_str (), add_stat, c);
@@ -798,7 +799,8 @@ ENGINE_ERROR_CODE DcpProducer::maybeSendNoop(struct dcp_message_producers* produ
798799                ret = ENGINE_WANT_MORE;
799800                noopCtx.pendingRecv  = true ;
800801                noopCtx.sendTime  = ep_current_time ();
801-                 lastSendTime = ep_current_time ();
802+                 lastSendTime.store (ep_current_time (),
803+                                    std::memory_order_relaxed);
802804            }
803805            return  ret;
804806        }
0 commit comments