-
Bug
-
Resolution: Done
-
Minor
-
3.0.4.Final
-
False
-
None
-
False
In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
Bug report
The SnapshotRecord Enum defines following values:
// public enum SnapshotRecord { /** * Record is from snapshot is not the last one. */ TRUE, /** * Record is from snapshot is the first record generated in snapshot phase. */ FIRST, /** * Record is from snapshot and the first record generated from the table, but not in the entire snapshot. */ FIRST_IN_DATA_COLLECTION, /** * Record is from snapshot and the last record generated from the table, but not in the entire snapshot. */ LAST_IN_DATA_COLLECTION, /** * Record is from snapshot is the last record generated in snapshot phase. */ LAST, /** * Record is from streaming phase. */ FALSE, /** * Record is from incremental snapshot window. */ INCREMENTAL;
But the AbstractSourceInfoStructMaker only allows part of the values for snapshot field:
// public abstract class AbstractSourceInfoStructMaker<T extends AbstractSourceInfo> implements SourceInfoStructMaker<T> { public static final Schema SNAPSHOT_RECORD_SCHEMA = Enum.builder("true,last,false,incremental").defaultValue("false").optional().build();
This will cause compatibility checking failed when downstream receives a value "first", but the field schema only allows "true,last,false,incremental".
What Debezium connector do you use and what version?
This issue exists in all versions.
Implementation ideas (optional)
The snapshot field schema should allow all possible Enum values.