DBZ-7567 Fix null event timestamp possible from FORMAT_DESCRIPTION and PREVIOUS_GTIDS events in MySqlStreamingChangeEventSource::setEventTimestamp

This commit is contained in:
Lourens Naude 2024-02-27 00:07:27 +00:00 committed by Jiri Pechanec
parent c3ff0fb197
commit bba11001b3

View File

@ -227,7 +227,7 @@ protected void onEvent(MySqlOffsetContext offsetContext, Event event) {
}
private void setEventTimestamp(Event event, long eventTs) {
if (connection.isMariaDb() || !isGtidModeEnabled) {
if (eventTimestamp == null || connection.isMariaDb() || !isGtidModeEnabled) {
// Fallback to second resolution event timestamps
eventTimestamp = Instant.ofEpochMilli(eventTs);
}