-
Enhancement
-
Resolution: Done
-
Minor
-
1.9.1.Final
-
None
-
False
-
None
-
False
Bug report
For bug reports, provide this information, please:
What Debezium connector do you use and what version?
oracle, 1.9.0
What is the connector configuration?
connector config does not specify `tomstones.on.delete` property
What behaviour do you expect?
if the debezium consumer implements
@Override
public boolean supportsTombstoneEvents() {
return false;
}
then the debezium engine should not pass in tombstones
What behaviour do you see?
tombstones reach the consumer
Do you see the same behaviour using the latest relesead Debezium version?
yes
Implementation ideas (optional)
In https://github.com/debezium/debezium/blob/main/debezium-embedded/src/main/java/io/debezium/embedded/EmbeddedEngine.java#L293 one could e.g. add following logic:
if (!config.hasKey(CommonConnectorConfig.TOMBSTONES_ON_DELETE.name()) && !handler.supportsTombstoneEvents()) {
config = config.mapped((k,v) -> {
if (k == CommonConnectorConfig.TOMBSTONES_ON_DELETE.name()) {
return Boolean.FALSE.toString();
} else {
return v;
}
});
} else if (config.hasKey(CommonConnectorConfig.TOMBSTONES_ON_DELETE.name()) &&
config.getBoolean(CommonConnectorConfig.TOMBSTONES_ON_DELETE.name()) &&
!handler.supportsTombstoneEvents()) {
// TODO alert user about incompatible preferences?
// or give preference to indication from handler
}
annoying part is: user can express desire for tombstones or not in 2 ways, potentially conflicting.
If any such code is changed then probably following is no longer needed: https://github.com/debezium/debezium/blob/main/debezium-server/debezium-server-core/src/main/java/io/debezium/server/DebeziumServer.java#L135-L137