Skip to content

Commit

Permalink
bubble up debezium config error messages as exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-airbyte committed Dec 19, 2023
1 parent 26d3746 commit 86a9add
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions airbyte-cdk/java/airbyte-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ MavenLocal debugging steps:

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.8.1 | 2023-12-19 | [\#33658](https://github.com/airbytehq/airbyte/pull/33658) | Always fail when debezium fails, even if it happened during the setup phase. |
| 0.8.0 | 2023-12-18 | [\#33506](https://github.com/airbytehq/airbyte/pull/33506) | Improve async destination shutdown logic; more JDBC async migration work; improve DAT test schema handling |
| 0.7.9 | 2023-12-18 | [\#33549](https://github.com/airbytehq/airbyte/pull/33549) | Improve MongoDB logging. |
| 0.7.8 | 2023-12-18 | [\#33365](https://github.com/airbytehq/airbyte/pull/33365) | Emit stream statuses more consistently |
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.8.0
version=0.8.1
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ public void start(final BlockingQueue<ChangeEvent<String, String>> queue) {
.using((success, message, error) -> {
LOGGER.info("Debezium engine shutdown. Engine terminated successfully : {}", success);
LOGGER.info(message);
thrownError.set(error);
// If debezium has not shutdown correctly, it can indicate an error with the connector configuration
// or a partial sync success.
// In situations like these, the preference is to fail loud and clear.
if (thrownError.get() != null && !success) {
thrownError.set(new RuntimeException(message));
if (!success) {
if (error != null) {
thrownError.set(error);
} else {
// There are cases where Debezium doesn't succeed but only fills the message field.
// In that case, we still want to fail loud and clear
thrownError.set(new RuntimeException(message));
}
}
engineLatch.countDown();
})
Expand Down

0 comments on commit 86a9add

Please sign in to comment.