MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Stop

Method Stop

server/logrepl/replication.go:403–415  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

401
402// Stop stops the replication process and blocks until clean shutdown occurs.
403func (r *LogicalReplicator) Stop() {
404 r.mu.Lock()
405 if !r.running {
406 r.mu.Unlock()
407 return
408 }
409 r.mu.Unlock()
410
411 log.Print("stopping replication...")
412 r.stop <- struct{}{}
413 // wait for the channel to be closed, acknowledging that the replicator has stopped
414 <-r.stop
415}
416
417// replicateQuery executes the query provided on the replica connection
418func (r *LogicalReplicator) replicateQuery(replicationConn *pgx.Conn, query string) error {

Callers 4

StopProfilingFunction · 0.45
RunFunction · 0.45
runServerFunction · 0.45
resultForDefaultIterMethod · 0.45

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected