You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classify mid-CDC SSH tunnel failures as connectivity errors (PeerDB-io#4443)
## What
When an SSH tunnel's keepalive fails mid-CDC, the Postgres connector
proactively closes the replication connection. That surfaces in the CDC
loop as a generic `ReceiveMessage failed` error which — depending on the
underlying type — could fall through to the unclassified `OTHER` bucket
(`NotifyTelemetry`) and **page us**, even though tunnel failures are
retriable and almost always customer-side.
SSH *setup* failures were already classified as `NOTIFY_CONNECTIVITY`;
this closes the gap for failures that happen *during* CDC while the
tunnel is open.
## Changes
- New `SSHTunnelConnectionError` exception type.
- CDC `PullCdcRecords` wraps the read error in it when `p.ssh.IsBad()`.
- Classifier maps it to `NOTIFY_CONNECTIVITY` (notify user, no page),
placed before the generic `net.*` matchers so the tunnel context isn't
lost.
- `SSHTunnel.badTunnel` is now `atomic.Bool` (read from the CDC loop) +
nil-safe `IsBad()` accessor.
- Added classifier unit test.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments