Really start caching by fixing swapped CAS... (#18842)

This commit is contained in:
Ryo Onodera
2021-07-23 10:17:19 +09:00
committed by GitHub
parent 5cabb5bb11
commit 611af87fdb

View File

@ -344,7 +344,7 @@ impl StandardBroadcastRun {
if now - last > BROADCAST_PEER_UPDATE_INTERVAL_MS if now - last > BROADCAST_PEER_UPDATE_INTERVAL_MS
&& self && self
.last_peer_update .last_peer_update
.compare_and_swap(now, last, Ordering::Relaxed) .compare_and_swap(last, now, Ordering::Relaxed)
== last == last
{ {
*self.cluster_nodes.write().unwrap() = ClusterNodes::<BroadcastStage>::new( *self.cluster_nodes.write().unwrap() = ClusterNodes::<BroadcastStage>::new(