MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / setError

Method setError

db/active_replicator_common.go:413–419  ·  view source on GitHub ↗

setError updates state to ReplicationStateError and sets the last error.

(err error)

Source from the content-addressed store, hash-verified

411
412// setError updates state to ReplicationStateError and sets the last error.
413func (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.
422func (arc *activeReplicatorCommon) setLastError(err error) {

Callers 2

StartMethod · 0.95
_startSendingChangesMethod · 0.80

Calls 3

InfofCtxFunction · 0.92
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected