Skip to content

Commit e887944

Browse files
author
ffffwh
committed
misc
- add logs for BiglogRelay - queueOrExec
1 parent cc14fce commit e887944

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

driver/mysql/applier_incr.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,11 @@ func (a *ApplierIncr) ApplyBinlogEvent(workerIdx int, binlogEntryCtx *common.Ent
533533
// TODO check if shutdown?
534534
if !a.noBigTxDMLPipe && a.inBigTx {
535535
a.bigTxEventWg.Add(1)
536-
a.bigTxEventQueue <- item
536+
select {
537+
case <-a.shutdownCh:
538+
return fmt.Errorf("queueOrExec: ApplierIncr shutdown")
539+
case a.bigTxEventQueue <- item:
540+
}
537541
return nil
538542
} else {
539543
return a.prepareIfNilAndExecute(item, workerIdx)

driver/mysql/binlog/binlog_reader.go

+1
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ func (b *BinlogReader) ConnectBinlogStreamer(coordinates common.MySQLCoordinates
330330
}
331331

332332
go func() {
333+
b.logger.Info("starting BinlogRelay", "gtidSet", coordinates.GtidSet)
333334
pr := b.relay.Process(ctx)
334335
b.logger.Warn("relay.Process stopped", "isCancelled", pr.IsCanceled, "deail", string(pr.Detail))
335336
for _, prErr := range pr.Errors {

0 commit comments

Comments
 (0)