From 824d6508555f5f0c30acef0d13d8c590c34be261 Mon Sep 17 00:00:00 2001 From: "DESKTOP-E2OL3QR\\Eitam" Date: Sun, 30 Jan 2022 14:05:43 +0200 Subject: [PATCH 1/2] Added delete on table when deleted --- replication/binlogsyncer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/replication/binlogsyncer.go b/replication/binlogsyncer.go index 1c58773ac..0ebda2e1a 100644 --- a/replication/binlogsyncer.go +++ b/replication/binlogsyncer.go @@ -7,6 +7,7 @@ import ( "fmt" "net" "os" + "strings" "sync" "time" @@ -725,6 +726,11 @@ func (b *BinlogSyncer) onStream(s *BinlogStreamer) { switch data[0] { case OK_HEADER: if err = b.parseEvent(b.nextPos.Name, s, data); err != nil { + // if the error is errMissingTableMapEvent skip + if strings.Contains(strings.ToLower(errors.Cause(err).Error()), errMissingTableMapEvent.Error()) { + log.Errorf("invalid table skipping , problay deleted? %s", err.Error()) + continue + } s.closeWithError(err) return } From 61a148b69f317e4eb55ca12a56cf782d0f70a213 Mon Sep 17 00:00:00 2001 From: "DESKTOP-E2OL3QR\\Eitam" Date: Sun, 30 Jan 2022 14:06:02 +0200 Subject: [PATCH 2/2] probably grammar --- replication/binlogsyncer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replication/binlogsyncer.go b/replication/binlogsyncer.go index 0ebda2e1a..e56875d15 100644 --- a/replication/binlogsyncer.go +++ b/replication/binlogsyncer.go @@ -728,7 +728,7 @@ func (b *BinlogSyncer) onStream(s *BinlogStreamer) { if err = b.parseEvent(b.nextPos.Name, s, data); err != nil { // if the error is errMissingTableMapEvent skip if strings.Contains(strings.ToLower(errors.Cause(err).Error()), errMissingTableMapEvent.Error()) { - log.Errorf("invalid table skipping , problay deleted? %s", err.Error()) + log.Errorf("invalid table skipping , probably deleted? %s", err.Error()) continue } s.closeWithError(err)