public void Handle(ReplicationTrackingMessage.ReplicatedTo message) { //TODO(clc): if the node is busy and misses an update it might be a long time till the next update do we need check if they get too stale? foreach (var subscription in _subscriptions.Values) { if (subscription.IsConnectionClosed ||subscription.SendQueueSize >= MaxQueueSize) { continue;} subscription.SendMessage(message); } }
public void Handle(ReplicationTrackingMessage.ReplicatedTo received) { if (_managerState != ManagerState.WaitingForConditions) { // silently ignore. we'll get these all the time } else { ConsiderBecomingLeader(received, log: false); } }
public void Handle(ReplicationTrackingMessage.ReplicatedTo message) { EnqueueReplicatedCommits(); }
private TcpPackage WrapReplicatedTo(ReplicationTrackingMessage.ReplicatedTo msg) { var dto = new ReplicationMessageDto.ReplicatedTo(msg.LogPosition); return(new TcpPackage(TcpCommand.LeaderReplicatedTo, Guid.NewGuid(), dto.Serialize())); }
public void Handle(ReplicationTrackingMessage.ReplicatedTo message) { Interlocked.Exchange(ref _replicatedPosition, message.LogPosition); Notify(_notifyReplicated, message.LogPosition); }
public void Handle(ReplicationTrackingMessage.ReplicatedTo message) => _commitSource.Handle(message);