DBZ-2499: Debezium Connectors are failing while reading binlog: Unknown event type 100 #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AWS Aurora writes some non-standard ignorable (
LOG_EVENT_IGNORABLE_F
) events of types100
and101
to the binlog (no documentation reference so far). If the binlog reader reads an event of an unknown type, it stops at the position right after the event type.A subsequent call to
reader.readEvent()
will resume from this position and misinterpret the remaining portion of the previous event's header as a new event header. In the best case, it will return some other unknown-type event (see the test). In the worst case (if it interprets the remaining part asROTATE
), it will read the rest of the binlog in memory:mysql-binlog-connector-java/src/main/java/com/github/shyiko/mysql/binlog/event/deserialization/RotateEventDataDeserializer.java
Lines 29 to 34 in c9c8903
It's not clear how this issue should be solved properly since
EventHeader#getType()
only allows to return a value of theEventType
type which by design cannot contain any non-standard values.mysql-binlog-connector-java/src/main/java/com/github/shyiko/mysql/binlog/event/EventHeader.java
Line 26 in 61482c5
The proposed solution is to represent an unknown event with the
UNKNOWN
type and let the consumer decide how to handle it.