Esempio n. 1
0
			public override void Reply(InstallSnapshotResponse resp)
			{
				Reply(resp.Success, resp);	
			}
Esempio n. 2
0
        public override void Handle(InstallSnapshotResponse resp)
        {
            if (FromOurTopology(resp) == false)
            {
                _log.Info("Got an append entries response message outside my cluster topology (id: {0}), ignoring", resp.ClusterTopologyId);
                return;
            }

            _matchIndexes[resp.From] = resp.LastLogIndex;
            _nextIndexes[resp.From] = resp.LastLogIndex + 1;
            _lastContact[resp.From] = DateTime.UtcNow;
            Task snapshotInstallationTask;
            _snapshotsPendingInstallation.TryRemove(resp.From, out snapshotInstallationTask);
            if (resp.Success == false)
            {
                _log.Warn("Failed to install snapshot for {0} (term {1} / index {2}) because: {3}",
                    resp.From, resp.CurrentTerm, resp.LastLogIndex, resp.Message);
            }
            else
            {
                _log.Info("Successfully installed snapshot at {0} for (term {1} / index {2})",
                    resp.From, resp.CurrentTerm, resp.LastLogIndex);
            }
        }
		public virtual void Handle(InstallSnapshotResponse resp)
		{
			//irrelevant here, so doing nothing (used only in LeaderStateBehavior)
		}