DBZ-278 Create topic only when needed

This commit is contained in:
Jiri Pechanec 2018-02-13 05:08:19 +01:00 committed by Gunnar Morling
parent 90e4aa0dea
commit 2e4be4c5ee

View File

@ -79,7 +79,6 @@ public synchronized void start(Map<String, String> props) {
// First check if db history is available
if (!taskContext.historyExists()) {
taskContext.initializeHistoryStorage();
if (taskContext.isSchemaOnlyRecoverySnapshot()) {
startWithSnapshot = true;
@ -95,6 +94,7 @@ public synchronized void start(Map<String, String> props) {
String msg = "The db history topic is missing. You may attempt to recover it by reconfiguring the connector to " + SnapshotMode.SCHEMA_ONLY_RECOVERY;
throw new ConnectException(msg);
}
taskContext.initializeHistoryStorage();
} else {
// Before anything else, recover the database history to the specified binlog coordinates ...