Skip to content

Conversation

@marxus
Copy link

@marxus marxus commented Dec 29, 2025

When using IAM authentication for RDS, the token expires after ~15 minutes. The sql_select processor now detects connection failures (driver.ErrBadConn) and automatically reconnects with a fresh IAM token, then retries the query.

Changes:

  • Store driver, dsn, and connSettings on struct for reconnection
  • Add reconnect() method that closes old connection and establishes new one
  • Detect driver.ErrBadConn in ProcessBatch and trigger reconnection
  • Retry failed query after successful reconnection

Related to: #469

When using IAM authentication for RDS, the token expires after ~15 minutes.
The sql_select processor now detects connection failures (driver.ErrBadConn)
and automatically reconnects with a fresh IAM token, then retries the query.

Changes:
- Store driver, dsn, and connSettings on struct for reconnection
- Add reconnect() method that closes old connection and establishes new one
- Detect driver.ErrBadConn in ProcessBatch and trigger reconnection
- Retry failed query after successful reconnection

Related to: warpstreamlabs#469
@marxus
Copy link
Author

marxus commented Dec 29, 2025

THIS IS NOT TO BE MERGED YET. the fix was "vibed" and havent been tested yet. it seems like the above fix on #469 only apply to partial sql methods. not sure if this is the right way to add the reconnect mechanism. so treat this contribute as a proposal for a fix.

image

@marxus marxus marked this pull request as draft December 29, 2025 08:44
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.

1 participant