MCPcopy Create free account
hub / github.com/apecloud/myduckserver / Stop

Method Stop

pgserver/logrepl/replication.go:488–500  ·  view source on GitHub ↗

Stop stops the replication process and blocks until clean shutdown occurs.

()

Source from the content-addressed store, hash-verified

486
487// Stop stops the replication process and blocks until clean shutdown occurs.
488func (r *LogicalReplicator) Stop() {
489 r.mu.Lock()
490 if !r.running {
491 r.mu.Unlock()
492 return
493 }
494 r.mu.Unlock()
495
496 r.logger.Info("stopping replication...")
497 r.stop <- struct{}{}
498 // wait for the channel to be closed, acknowledging that the replicator has stopped
499 <-r.stop
500}
501
502// beginReplication starts a new replication connection to the primary server and returns it. The LSN provided is the
503// last one we have confirmed that we flushed to disk.

Callers 5

resultForDefaultIterMethod · 0.45
StartReplicationMethod · 0.45
runReplicationScriptFunction · 0.45
handlePseudoQueryFunction · 0.45
UpdateSubscriptionsFunction · 0.45

Calls

no outgoing calls

Tested by 2

runReplicationScriptFunction · 0.36
handlePseudoQueryFunction · 0.36