Skip to content

Commit 41a242b

Browse files
authored
Remove logging of unhandled debezium events (#45368)
1 parent e4c26e8 commit 41a242b

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

airbyte-cdk/java/airbyte-cdk/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ corresponds to that version.
173173
### Java CDK
174174

175175
| Version | Date | Pull Request | Subject |
176-
| :--------- | :--------- | :----------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- |
176+
|:-----------|:-----------| :----------------------------------------------------------- |:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
177+
| 0.44.22 | 2024-09-10 | [\#45368](https://github.com/airbytehq/airbyte/pull/45368) | Remove excessive debezium logging |
177178
| 0.44.21 | 2024-09-04 | [\#45143](https://github.com/airbytehq/airbyte/pull/45143) | S3-destination: don't overwrite existing files, skip those file indexes instead |
178179
| 0.44.20 | 2024-08-30 | [\#44933](https://github.com/airbytehq/airbyte/pull/44933) | Avro/Parquet destinations: handle `{}` schemas inside objects/arrays |
179180
| 0.44.19 | 2024-08-20 | [\#44476](https://github.com/airbytehq/airbyte/pull/44476) | Increase Jackson message length limit to 100mb |
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.44.21
1+
version=0.44.22

airbyte-cdk/java/airbyte-cdk/db-sources/src/main/kotlin/io/airbyte/cdk/integrations/debezium/internals/DebeziumRecordIterator.kt

+8-3
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ class DebeziumRecordIterator<T>(
174174

175175
// #41647: discard event type with op code 'm'
176176
if (!isEventTypeHandled(changeEventWithMetadata)) {
177-
LOGGER.info { "WAL event type not handled: $next" }
178177
continue
179178
}
180179

@@ -332,7 +331,7 @@ class DebeziumRecordIterator<T>(
332331
companion object {
333332
val pollLogMaxTimeInterval: Duration = Duration.ofSeconds(5)
334333
const val POLL_LOG_MAX_CALLS_INTERVAL = 1_000
335-
334+
private val unhandledFoundTypeList: MutableList<String> = mutableListOf()
336335
/**
337336
* We are not interested in message events. According to debezium
338337
* [documentation](https://debezium.io/documentation/reference/stable/connectors/postgresql.html#postgresql-create-events)
@@ -341,7 +340,13 @@ class DebeziumRecordIterator<T>(
341340
*/
342341
fun isEventTypeHandled(event: ChangeEventWithMetadata): Boolean {
343342
event.eventValueAsJson?.get("op")?.asText()?.let {
344-
return it in listOf("c", "u", "d", "t")
343+
val handled = it in listOf("c", "u", "d", "t")
344+
if (!handled && !unhandledFoundTypeList.contains(it)) {
345+
unhandledFoundTypeList.add(it)
346+
LOGGER.info { "WAL event type not handled: $it" }
347+
LOGGER.debug { "event: $event" }
348+
}
349+
return handled
345350
}
346351
?: return false
347352
}

airbyte-integrations/connectors/source-mssql/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
airbyteJavaConnector {
6-
cdkVersionRequired = '0.44.18'
6+
cdkVersionRequired = '0.44.22'
77
features = ['db-sources']
88
useLocalCdk = false
99
}

airbyte-integrations/connectors/source-mssql/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ data:
99
connectorSubtype: database
1010
connectorType: source
1111
definitionId: b5ea17b1-f170-46dc-bc31-cc744ca984c1
12-
dockerImageTag: 4.1.11
12+
dockerImageTag: 4.1.12
1313
dockerRepository: airbyte/source-mssql
1414
documentationUrl: https://docs.airbyte.com/integrations/sources/mssql
1515
githubIssueLabel: source-mssql

docs/integrations/sources/mssql.md

+1
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ WHERE actor_definition_id ='b5ea17b1-f170-46dc-bc31-cc744ca984c1' AND (configura
422422

423423
| Version | Date | Pull Request | Subject |
424424
|:--------|:-----------|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------|
425+
| 4.1.12 | 2024-09-10 | [45368](https://github.com/airbytehq/airbyte/pull/45368) | Remove excessive debezium logging. |
425426
| 4.1.11 | 2024-09-04 | [45142](https://github.com/airbytehq/airbyte/pull/45142) | Fix incorrect datetimeoffset format in cursor state. |
426427
| 4.1.10 | 2024-08-27 | [44759](https://github.com/airbytehq/airbyte/pull/44759) | Improve null safety in parsing debezium change events. |
427428
| 4.1.9 | 2024-08-27 | [44841](https://github.com/airbytehq/airbyte/pull/44841) | Adopt latest CDK. |

0 commit comments

Comments
 (0)