Skip to content

Commit 8e53180

Browse files
authored
[DB Sources] : Add analytics message to understand when WASS occurs (not just when we timeout) (#42068)
1 parent 939bb2e commit 8e53180

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ corresponds to that version.
175175
=======
176176
| Version | Date | Pull Request | Subject |
177177
|:------------|:-----------| :--------------------------------------------------------- |:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
178+
| 0.41.8 | 2024-07-18 | [\#42068](https://github.com/airbytehq/airbyte/pull/42068) | Add analytics message for WASS occurrence. |
178179
| 0.41.7 | 2024-07-17 | [\#42055](https://github.com/airbytehq/airbyte/pull/42055) | Add debezium heartbeat timeout back to shutdown debezium. |
179180
| 0.41.6 | 2024-07-17 | [\#41996](https://github.com/airbytehq/airbyte/pull/41996) | Fix java interop compilation issue in Config/TransientErrorException. |
180181
| 0.41.5 | 2024-07-16 | [\#42011] (https://github.com/airbytehq/airbyte/pull/42011) | Async consumer accepts null default namespace |

airbyte-cdk/java/airbyte-cdk/core/src/main/kotlin/io/airbyte/cdk/db/DbAnalyticsUtils.kt

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ object DbAnalyticsUtils {
1515
const val DATA_TYPES_SERIALIZATION_ERROR_KEY = "db-sources-data-serialization-error"
1616
const val CDC_SNAPSHOT_FORCE_SHUTDOWN_KEY = "db-sources-snapshot-force-shutdown"
1717
const val DEBEZIUM_CLOSE_REASON_KEY = "db-sources-debezium-close-reason"
18+
const val WASS_OCCURRENCE_KEY = "db-sources-wass-occurrence"
1819

1920
@JvmStatic
2021
fun cdcCursorInvalidMessage(): AirbyteAnalyticsTraceMessage {
@@ -39,4 +40,9 @@ object DbAnalyticsUtils {
3940
fun debeziumCloseReasonMessage(reason: String): AirbyteAnalyticsTraceMessage {
4041
return AirbyteAnalyticsTraceMessage().withType(DEBEZIUM_CLOSE_REASON_KEY).withValue(reason)
4142
}
43+
44+
@JvmStatic
45+
fun wassOccurrenceMessage(): AirbyteAnalyticsTraceMessage {
46+
return AirbyteAnalyticsTraceMessage().withType(WASS_OCCURRENCE_KEY).withValue("1")
47+
}
4248
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.41.7
1+
version=0.41.8

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ java {
1212
}
1313

1414
airbyteJavaConnector {
15-
cdkVersionRequired = '0.41.7'
15+
cdkVersionRequired = '0.41.8'
1616
features = ['db-sources', 'datastore-postgres']
1717
useLocalCdk = false
1818
}

airbyte-integrations/connectors/source-postgres/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: decd338e-5647-4c0b-adf4-da0e75f5a750
12-
dockerImageTag: 3.5.1
12+
dockerImageTag: 3.5.2
1313
dockerRepository: airbyte/source-postgres
1414
documentationUrl: https://docs.airbyte.com/integrations/sources/postgres
1515
githubIssueLabel: source-postgres

airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/cdc/PostgresCdcCtidInitializer.java

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package io.airbyte.integrations.source.postgres.cdc;
66

77
import static io.airbyte.cdk.db.DbAnalyticsUtils.cdcCursorInvalidMessage;
8+
import static io.airbyte.cdk.db.DbAnalyticsUtils.wassOccurrenceMessage;
89
import static io.airbyte.integrations.source.postgres.PostgresQueryUtils.streamsUnderVacuum;
910
import static io.airbyte.integrations.source.postgres.PostgresSpecConstants.FAIL_SYNC_OPTION;
1011
import static io.airbyte.integrations.source.postgres.PostgresSpecConstants.INVALID_CDC_CURSOR_POSITION_PROPERTY;
@@ -332,6 +333,7 @@ public static List<AutoCloseableIterator<AirbyteMessage>> cdcCtidIteratorsCombin
332333
* sync to clear the WAL. We cannot simply add the same cdc iterators as their target end position
333334
* is fixed to the tip of the WAL at the start of the sync.
334335
*/
336+
AirbyteTraceMessageUtility.emitAnalyticsTrace(wassOccurrenceMessage());
335337
final var propertiesManager = new RelationalDbDebeziumPropertiesManager(
336338
PostgresCdcProperties.getDebeziumDefaultProperties(database), sourceConfig, catalog, startedCdcStreamList);
337339
final Supplier<AutoCloseableIterator<AirbyteMessage>> incrementalIteratorSupplier = getCdcIncrementalIteratorsSupplier(handler,

docs/integrations/sources/postgres.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ According to Postgres [documentation](https://www.postgresql.org/docs/14/datatyp
311311

312312
| Version | Date | Pull Request | Subject |
313313
|---------|------------|----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
314-
| 3.5.1 | 2024-07-17 | [42055](https://github.com/airbytehq/airbyte/pull/42055) | Add debezium heartbeat timeout back to shutdown debezium. |
314+
| 3.5.2 | 2024-07-17 | [42068](https://github.com/airbytehq/airbyte/pull/42068) | Add analytics for WASS case occurrence. |
315+
| 3.5.1 | 2024-07-17 | [42055](https://github.com/airbytehq/airbyte/pull/42055) | Add debezium heartbeat timeout back to shutdown debezium. |
315316
| 3.5.0 | 2024-07-17 | [41651](https://github.com/airbytehq/airbyte/pull/41651) | Implement WASS algo - large initial snapshots shouldn't block CDC. |
316317
| 3.4.26 | 2024-07-15 | [41654](https://github.com/airbytehq/airbyte/pull/41654) | Allow null value for array typed columns in CDC. |
317318
| 3.4.25 | 2024-07-12 | [41651](https://github.com/airbytehq/airbyte/pull/41651) | Throw transient error if tables of interest and undergoing full vacuum. |

0 commit comments

Comments
 (0)