Skip to content

[fix](paimon) reconnect stale jdbc catalog#61418

Draft
xylaaaaa wants to merge 17 commits intoapache:masterfrom
xylaaaaa:fix/paimon-jdbc-reconnect
Draft

[fix](paimon) reconnect stale jdbc catalog#61418
xylaaaaa wants to merge 17 commits intoapache:masterfrom
xylaaaaa:fix/paimon-jdbc-reconnect

Conversation

@xylaaaaa
Copy link
Contributor

Problem

  • paimon 1.1.1 JDBC catalog keeps long-lived JDBC connections in JdbcClientPool
  • borrowed connections are reused without validity checks
  • after MySQL wait_timeout, read paths can fail with stale connection errors such as CJCommunicationsException / Broken pipe

Fix

  • detect stale JDBC connection failures in PaimonExternalCatalog for JDBC catalogs
  • reset the catalog to uninitialized, rebuild the underlying Paimon catalog, and retry read operations once
  • keep retry scope on read paths only to avoid replaying mutating DDL operations
  • clear metadataOps and catalog references during close to prevent stale objects from being reused

Tests

  • added PaimonJdbcCatalogReconnectTest
  • verified the targeted FE UT passed: Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants