Skip to content

Commit e3d32be

Browse files
committed
add Logging when fake rotate event occured
1 parent 08219f7 commit e3d32be

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

pymysqlreplication/binlogstream.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,20 @@ def fetchone(self):
677677
] = binlog_event.event.get_table()
678678

679679
# event is none if we have filter it on packet level
680-
# we filter also not allowed events
681-
if binlog_event.event is None or (
682-
binlog_event.event.__class__ not in self.__allowed_events
683-
):
680+
if binlog_event.event is None:
681+
logging.log(
682+
logging.WARN,
683+
"""
684+
A pymysql.OperationalError error occurred, causing a fake rotate event and initialization of the table_map
685+
""",
686+
)
687+
continue
688+
# we filter not allowed events
689+
if binlog_event.event.__class__ not in self.__allowed_events:
690+
logging.log(
691+
logging.INFO,
692+
binlog_event.event.__class__ + "is not allowed events",
693+
)
684694
continue
685695

686696
if binlog_event.event_type == FORMAT_DESCRIPTION_EVENT:

0 commit comments

Comments
 (0)