DBZ-5626 Don't check ofsset for AWLAYS mode

While `ALWAYS` mode allows also snapshot on schema error, it allows
snapshot also on other ocassions. Don't throw exception when offset
is missing and schema is set to `ALWAYS`.
This commit is contained in:
Vojtech Juranek 2022-11-08 16:47:35 +01:00 committed by Chris Cranford
parent a7e005da25
commit f347c1c844

View File

@ -178,7 +178,7 @@ private void validateRedoLogConfiguration() {
private void validateAndLoadSchemaHistory(OracleConnectorConfig config, OraclePartition partition, OracleOffsetContext offset, OracleDatabaseSchema schema) {
if (offset == null) {
if (config.getSnapshotMode().shouldSnapshotOnSchemaError()) {
if (config.getSnapshotMode().shouldSnapshotOnSchemaError() && config.getSnapshotMode() != OracleConnectorConfig.SnapshotMode.ALWAYS) {
// We are in schema only recovery mode, use the existing redo log position
// would like to also verify redo log position exists, but it defaults to 0 which is technically valid
throw new DebeziumException("Could not find existing redo log information while attempting schema only recovery snapshot");