We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3bae489 + e8bb235 commit 08a8fe3Copy full SHA for 08a8fe3
pymysqlreplication/event.py
@@ -3,6 +3,7 @@
3
import datetime
4
import decimal
5
import zlib
6
+import logging
7
8
from pymysqlreplication.constants.STATUS_VAR_KEY import *
9
from pymysqlreplication.exceptions import StatusVariableMismatch
@@ -58,6 +59,11 @@ def _verify_event(self):
58
59
footer = self.packet.read(4)
60
byte_data = zlib.crc32(data).to_bytes(4, byteorder="little")
61
self._is_event_valid = True if byte_data == footer else False
62
+ if not self._is_event_valid:
63
+ logging.error(
64
+ f"An CRC32 has failed for the event type {self.event_type}, "
65
+ "indicating a potential integrity issue with the data."
66
+ )
67
self.packet.read_bytes -= 19 + self.event_size + 4
68
self.packet.rewind(20)
69
0 commit comments