diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index d203e9140..fe3c31bd8 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -72,6 +72,7 @@ Horia Chiorean Ian Axelrod Igor Gabaydulin Ilia Bogdanov +Ivan Klass Ivan Kovbas Ivan Lorenz Ivan Luzyanin diff --git a/debezium-core/src/main/java/io/debezium/relational/history/DatabaseHistory.java b/debezium-core/src/main/java/io/debezium/relational/history/DatabaseHistory.java index 675e39dce..f6607e5dc 100644 --- a/debezium-core/src/main/java/io/debezium/relational/history/DatabaseHistory.java +++ b/debezium-core/src/main/java/io/debezium/relational/history/DatabaseHistory.java @@ -82,8 +82,8 @@ public interface DatabaseHistory { * {@link #recover(Map, Map, Tables, DdlParser) recovery}; may be null if the * {@link HistoryRecordComparator#INSTANCE default comparator} is to be used * @param listener TODO - * @param useCatalogBeforeSchema true if the parsed string for a table contains only 2 items and the first should be used as - the catalog and the second as the table name, or false if the first should be used as the schema and the + * @param useCatalogBeforeSchema true if the parsed string for a table contains only 2 items and the first should be used as + the catalog and the second as the table name, or false if the first should be used as the schema and the second as the table name */ void configure(Configuration config, HistoryRecordComparator comparator, DatabaseHistoryListener listener, boolean useCatalogBeforeSchema); @@ -128,15 +128,14 @@ public interface DatabaseHistory { void stop(); /** - * Determines if the DatabaseHistory entity exists - * @return + * Determines if the database history entity exists; i.e. the storage must have + * been initialized and the history must have been populated. */ boolean exists(); /** - * Determines if the underlying storage exists. - * Note: storage may exists while history entities not yet written, see {@link #exists()} - * @return + * Determines if the underlying storage exists (e.g. a Kafka topic, file or similar). + * Note: storage may exist while history entities not yet written, see {@link #exists()} */ boolean storageExists(); diff --git a/debezium-core/src/test/java/io/debezium/relational/history/KafkaDatabaseHistoryTest.java b/debezium-core/src/test/java/io/debezium/relational/history/KafkaDatabaseHistoryTest.java index c8c145f72..a02177bff 100644 --- a/debezium-core/src/test/java/io/debezium/relational/history/KafkaDatabaseHistoryTest.java +++ b/debezium-core/src/test/java/io/debezium/relational/history/KafkaDatabaseHistoryTest.java @@ -22,6 +22,7 @@ import org.junit.Test; import io.debezium.config.Configuration; +import io.debezium.doc.FixFor; import io.debezium.kafka.KafkaCluster; import io.debezium.relational.Tables; import io.debezium.relational.ddl.DdlParserSql2003; @@ -298,6 +299,7 @@ public void testExists() { } @Test + @FixFor("DBZ-1886") public void differentiateStorageExistsFromHistoryExists() { Configuration config = Configuration.create() .with(KafkaDatabaseHistory.BOOTSTRAP_SERVERS, kafka.brokerList()) @@ -326,5 +328,6 @@ public void differentiateStorageExistsFromHistoryExists() { "CREATE TABLE products ( productId INTEGER NOT NULL PRIMARY KEY, desc VARCHAR(255) NOT NULL); \n"; history.record(source, position, "db1", ddl); assertTrue(history.exists()); + assertTrue(history.storageExists()); } }