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

Method flushDeltaBuffer

pgserver/logrepl/replication.go:1027–1034  ·  view source on GitHub ↗

flushDeltaBuffer flushes the accumulated changes in the delta buffer

(state *replicationState, conn *stdsql.Conn, tx *stdsql.Tx, reason delta.FlushReason)

Source from the content-addressed store, hash-verified

1025
1026// flushDeltaBuffer flushes the accumulated changes in the delta buffer
1027func (r *LogicalReplicator) flushDeltaBuffer(state *replicationState, conn *stdsql.Conn, tx *stdsql.Tx, reason delta.FlushReason) error {
1028 defer func() {
1029 state.deltaBufSize = 0
1030 }()
1031
1032 _, err := state.deltas.Flush(state.replicaCtx, conn, tx, reason)
1033 return err
1034}
1035
1036func (r *LogicalReplicator) append(state *replicationState, relationID uint32, tuple []*pglogrepl.TupleDataColumn, actionType, eventType binlog.RowEventType, onlyKeys bool) error {
1037 rel, ok := state.relations[relationID]

Callers 2

processMessageMethod · 0.95
commitOngoingTxnMethod · 0.95

Calls 1

FlushMethod · 0.80

Tested by

no test coverage detected