File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 3
3
import datetime
4
4
import decimal
5
5
import zlib
6
+ import logging
6
7
7
8
from pymysqlreplication .constants .STATUS_VAR_KEY import *
8
9
from pymysqlreplication .exceptions import StatusVariableMismatch
@@ -57,7 +58,14 @@ def _verify_event(self):
57
58
data = self .packet .read (19 + self .event_size )
58
59
footer = self .packet .read (4 )
59
60
byte_data = zlib .crc32 (data ).to_bytes (4 , byteorder = "little" )
60
- self ._is_event_valid = True if byte_data == footer else False
61
+ if byte_data == footer :
62
+ self ._is_event_valid = True
63
+ else :
64
+ self ._is_event_valid = False
65
+ logging .error (
66
+ f"An CRC32 has failed for the event type { self .event_type } , "
67
+ "indicating a potential integrity issue with the data."
68
+ )
61
69
self .packet .read_bytes -= 19 + self .event_size + 4
62
70
self .packet .rewind (20 )
63
71
You can’t perform that action at this time.
0 commit comments