setError updates state to ReplicationStateError and sets the last error.
(err error)
| 411 | |
| 412 | // setError updates state to ReplicationStateError and sets the last error. |
| 413 | func (arc *activeReplicatorCommon) setError(err error) { |
| 414 | base.InfofCtx(arc.ctx, base.KeyReplicate, "ActiveReplicator had error state set with err: %v", err) |
| 415 | arc.stateErrorLock.Lock() |
| 416 | arc.state = ReplicationStateError |
| 417 | arc.lastError = err |
| 418 | arc.stateErrorLock.Unlock() |
| 419 | } |
| 420 | |
| 421 | // setLastError updates the lastError field for the replicator without updating the replicator state. |
| 422 | func (arc *activeReplicatorCommon) setLastError(err error) { |
no test coverage detected