Hello, we're exeperiencing some problems with the ...
# replication-troubleshooting
s
Hello, we're exeperiencing some problems with the latest ClickHouse connector (v2). All the connections are throwing this error
Sync completed, but unflushed states were detected.
during syncs, the stacktrace in the logs doesn't really give more information, I can post it here if necessary. At the same time, the Mapper configuration is also not working as expected compared to v1. Has anyone any idea of what's going on? Created an issue on GitHub https://github.com/airbytehq/airbyte/issues/69746
k
I'm sorry, but the knowledge sources provided do not contain any explicit information about the specific error message "Sync completed, but unflushed states were detected." in the context of the ClickHouse v2 connector, nor do they detail issues with the Mapper configuration compared to v1. However, there are several known migration and behavioral changes between ClickHouse connector v1 and v2 that could potentially impact syncs and state handling: - The v2 connector is a complete rewrite, with changes in how data is written (typed columns instead of raw JSON), how namespaces/databases are handled, and stricter configuration requirements (e.g., hostnames must not include protocol prefixes) [ClickHouse Migration Guide](https://docs.airbyte.com/integrations/destinations/clickhouse-migrations). - There have been reports of schema evolution and state handling bugs in early v2 releases, with several fixes and improvements in recent versions (see the changelog for details) [ClickHouse Changelog](https://docs.airbyte.com/integrations/destinations/clickhouse#changelog). - Some users have encountered issues with deduplication, column name sanitization, and state message formats, especially when using custom sources or when the state message emitted by the source does not match the expected format (e.g., missing attributes like sourceStats) [GitHub Issue 69140](https://github.com/airbytehq/airbyte/issues/69140). If you are seeing this error consistently: - Ensure you are running the latest version of the ClickHouse connector, as many bugs have been fixed in recent releases. - Double-check your source connector's state message format, especially if you are using a custom source. - Review your configuration for any migration gotchas, such as namespace/database handling or protocol in the hostname. If you can provide the stacktrace or more details about your setup (Airbyte version, source connector, sync mode, etc.), it may help narrow down the issue further. Unfortunately, without more specific information or a direct match in the knowledge sources, I can't provide a definitive answer. If the problem persists, I recommend opening a GitHub issue with detailed logs and configuration, or joining the Airbyte Slack for more direct support from the team and community [ClickHouse Beta Slack](https://join.slack.com/t/airbytehq/shared_invite/zt-380cpipgm-wcaGDoS2qKZd6Q1gq4w7BA) (though note the beta channel may be closed post-GA) [ClickHouse V2 Beta Discussion](https://github.com/airbytehq/airbyte/discussions/62035).
A message from kapa.ai
s
(@kapa.ai) Looking more deeply into it Airbyte actually completes the sync, but it fails in returning a successful status code, so it retries 5 times after giving up, with all the records being extracted and written to the destination, but giving an erroneous status (0 records) in the
Status
tab. Does anyone experienced this before for other connectors maybe, seems like a small bug, I could look into it if someone points me in the right direction 🙏 @[DEPRECATED] Marcos Marx the output of
StateStore
seems not correct, maybe the problem is not in the destination connector after all
k
Based on the knowledge sources provided, there are some similar issues reported with other connectors where the sync completes, data is transferred, but the Airbyte UI shows a failed or erroneous status. For example, a user developing custom connectors (SQL Server source and HTTP API destination) reported that the sync completed successfully with all records transferred, but the sync status was marked as FAILED in the UI. The error was related to a Java NullPointerException: "Cannot invoke 'java.lang.Integer.intValue()' because the return value of 'java.util.Map.get(Object)' is null." This suggests that Airbyte's internal bookkeeping or state tracking encountered an unexpected null value, causing the status to be reported incorrectly, even though the data transfer itself succeeded. The stacktrace pointed to the stream status tracking logic in Airbyte's replication worker code<sup>[source](https://github.com/airbytehq/airbyte/issues/57000)</sup>. This kind of issue can occur if: - The connector does not emit state messages in the expected format. - There is a mismatch or missing field in the state message or sync summary. - Airbyte's internal logic for summarizing the sync encounters an unexpected value. If you are interested in investigating or contributing a fix, reviewing the replication worker code, especially around state message handling and sync summary reporting, would be a good starting point. The referenced issue provides a stacktrace that may help you locate the relevant code paths. If you are using a custom connector or have made modifications, double-check that your connector emits all required state messages and fields. Otherwise, this may be a bug in Airbyte's core or the specific destination connector, and opening a detailed GitHub issue with logs and configuration would help the maintainers address it. In summary, yes, similar issues have been reported, and they often relate to state message handling or sync summary reporting bugs in Airbyte<sup>[source](https://github.com/airbytehq/airbyte/issues/57000)</sup>.
s
Does anyone know how can I run the locally build images with
abctl
, I'm trying to debug this problem, but I realize
abctl
will pull from the repository, while I'd like to provide the local build images where I added more debug logs.