Hi Liang -
There is some side work that we put into a schema history
compaction tool [1], but that isn't yet production ready so I'm
afraid the alternatives are:
- Deleting the history topic & re-create it using
snapshot.mode=recovery (Debezium 3+) or
snapshot.mode=schema_history_recovery (Debezium 1.x/2.x)
- Deleting the history & offsets paired with a re-snapshot
if applicable.
Just be aware that for (1), you need to guarantee that whatever
the connector's current read position offset is that there has
been no schema changes on the captured tables from that point in
time until now, since the history topic is re-created based on the
current table structure metadata and if there are any
inconsistencies, this will lead to connector failures when the
connector streams older events with different numbers of columns
or column types.
Thanks,
-cc