Since updating the Postgres connector from 2.0.0 -...
# replication-troubleshooting
b
Since updating the Postgres connector from 2.0.0 -> 2.0.2, I consistently encounter exceptions during CDC sync
Copy code
Failure Origin: source, Message: Something went wrong in the connector. See the logs for more details.
Rolling back to 2.0.0 allows me to recover. Relevant logs in the thread...
Copy code
2023-03-13 15:14:35 [44msource[0m > ERROR i.a.i.b.AirbyteExceptionHandler(uncaughtException):26 Something went wrong in the connector. See the logs for more details. java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "987835128720"
	at io.airbyte.integrations.debezium.internals.DebeziumStateDecoratingIterator.computeNext(DebeziumStateDecoratingIterator.java:163) ~[io.airbyte.airbyte-integrations.bases-debezium-0.41.0.jar:?]
	at io.airbyte.integrations.debezium.internals.DebeziumStateDecoratingIterator.computeNext(DebeziumStateDecoratingIterator.java:27) ~[io.airbyte.airbyte-integrations.bases-debezium-0.41.0.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146) ~[guava-31.1-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141) ~[guava-31.1-jre.jar:?]
	at io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.java:38) ~[io.airbyte-airbyte-commons-0.41.0.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146) ~[guava-31.1-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141) ~[guava-31.1-jre.jar:?]
	at io.airbyte.commons.util.CompositeIterator.computeNext(CompositeIterator.java:63) ~[io.airbyte-airbyte-commons-0.41.0.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146) ~[guava-31.1-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141) ~[guava-31.1-jre.jar:?]
	at io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.java:38) ~[io.airbyte-airbyte-commons-0.41.0.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146) ~[guava-31.1-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141) ~[guava-31.1-jre.jar:?]
	at io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.java:38) ~[io.airbyte-airbyte-commons-0.41.0.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146) ~[guava-31.1-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141) ~[guava-31.1-jre.jar:?]
	at java.util.Iterator.forEachRemaining(Iterator.java:132) ~[?:?]
	at io.airbyte.integrations.base.IntegrationRunner.lambda$produceMessages$0(IntegrationRunner.java:187) ~[io.airbyte.airbyte-integrations.bases-base-java-0.41.0.jar:?]
	at io.airbyte.integrations.base.IntegrationRunner.watchForOrphanThreads(IntegrationRunner.java:237) ~[io.airbyte.airbyte-integrations.bases-base-java-0.41.0.jar:?]
	at io.airbyte.integrations.base.IntegrationRunner.produceMessages(IntegrationRunner.java:186) ~[io.airbyte.airbyte-integrations.bases-base-java-0.41.0.jar:?]
	at io.airbyte.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:139) ~[io.airbyte.airbyte-integrations.bases-base-java-0.41.0.jar:?]
	at io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:98) ~[io.airbyte.airbyte-integrations.bases-base-java-0.41.0.jar:?]
	at io.airbyte.integrations.base.adaptive.AdaptiveSourceRunner$Runner.run(AdaptiveSourceRunner.java:86) ~[io.airbyte.airbyte-integrations.bases-base-java-0.41.0.jar:?]
	at io.airbyte.integrations.source.postgres.PostgresSourceRunner.main(PostgresSourceRunner.java:15) ~[io.airbyte.airbyte-integrations.connectors-source-postgres-0.41.0.jar:?]
Caused by: java.lang.NumberFormatException: For input string: "987835128720"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:668) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:786) ~[?:?]
	at io.airbyte.integrations.source.postgres.PostgresCdcStateHandler.isSameOffset(PostgresCdcStateHandler.java:105) ~[io.airbyte.airbyte-integrations.connectors-source-postgres-0.41.0.jar:?]
	at io.airbyte.integrations.debezium.internals.DebeziumStateDecoratingIterator.computeNext(DebeziumStateDecoratingIterator.java:149) ~[io.airbyte.airbyte-integrations.bases-debezium-0.41.0.jar:?]
	... 23 more

Stack Trace: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "987835128720"
	at io.airbyte.integrations.debezium.internals.DebeziumStateDecoratingIterator.computeNext(DebeziumStateDecoratingIterator.java:163)
	at io.airbyte.integrations.debezium.internals.DebeziumStateDecoratingIterator.computeNext(DebeziumStateDecoratingIterator.java:27)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141)
	at io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.java:38)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141)
	at io.airbyte.commons.util.CompositeIterator.computeNext(CompositeIterator.java:63)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141)
	at io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.java:38)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141)
	at io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.java:38)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:146)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:141)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
	at io.airbyte.integrations.base.IntegrationRunner.lambda$produceMessages$0(IntegrationRunner.java:187)
	at io.airbyte.integrations.base.IntegrationRunner.watchForOrphanThreads(IntegrationRunner.java:237)
	at io.airbyte.integrations.base.IntegrationRunner.produceMessages(IntegrationRunner.java:186)
	at io.airbyte.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:139)
	at io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:98)
	at io.airbyte.integrations.base.adaptive.AdaptiveSourceRunner$Runner.run(AdaptiveSourceRunner.java:86)
	at io.airbyte.integrations.source.postgres.PostgresSourceRunner.main(PostgresSourceRunner.java:15)
Caused by: java.lang.NumberFormatException: For input string: "987835128720"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
	at java.base/java.lang.Integer.parseInt(Integer.java:668)
	at java.base/java.lang.Integer.parseInt(Integer.java:786)
	at io.airbyte.integrations.source.postgres.PostgresCdcStateHandler.isSameOffset(PostgresCdcStateHandler.java:105)
	at io.airbyte.integrations.debezium.internals.DebeziumStateDecoratingIterator.computeNext(DebeziumStateDecoratingIterator.java:149)
	... 23 more
r
987835128720 is not a valid Java integer data type. The maximum value that can be stored in a Java integer data type (int) is 2,147,483,647, and the minimum value is -2,147,483,648. The value 987835128720 is larger than the maximum value that can be stored in an integer data type, so it cannot be represented as an integer in Java.
Was there any changes to the data in the interim, which is causing this failure
b
No, the only change is the source-postgres version
The error seems to be internal and a rollback fixes it
r
Not sure
b
Of the tables being synced, none have large integer fields
r
are you certain, did you check all the fields from the table what query did you use to check for such large values
b
I'll do a more exhaustive search shortly. But the sync is for two partitioned tables. The PK on each is a UUID and the only integer fields on either one are FKs for tables that aren't particularly large.
r
What is the data type for the FK
b
some FKs are UUIDs, some are INTs
I'm checking for the max IDs on each table right now for the INTs
the max INT ID on either table is
71,377,263
n
Hi! Could you please give me bit more info: 1. Airbyte version 2. Connector versions 3. Any sync logs
b
Sure thing! • Airbyte:
0.41.0
• source-postgres: ◦ With error:
2.0.2
◦ Without error:
2.0.0
• destination-s3:
0.3.21
• sync log in DM