Repository navigation
fix: support URI query params and stop target connection churn/leaks - #1013
zhongli-james merged 1 commit into
Conversation
EncodeMongoURI now preserves the URI query string so options such as directConnection, replicaSet, maxPoolSize and authSource reach the driver. Connection lifecycle fixes: - executor: only drop the client on network/timeout errors; close the old client before reconnecting - NewMongoCommunityConn: disconnect on Connect/Ping failure; bound Disconnect and the IsGood ping with a 10s timeout - close one-off check clients (direct_writer Prepare, sanitize checks, replication sanitize, change stream serverless Watch error) - wrap delete+insert fallback errors with %w so network errors classify - sanitize: return error on unreachable source instead of nil deref - doc_syncer: register wg.Done first to avoid deadlock on connect failure Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5034324 to
40ba299
Compare
|
Reviewed locally: LGTM — no blocking issues. Each change fixes a real defect and the logic is sound:
Compatibility with the existing special-char password handling — verified, fully compatible. All existing One edge worth noting (pre-existing, not introduced by this PR, out of scope): an unencoded A few other minor, non-blocking notes:
|

EncodeMongoURI now preserves the URI query string so options such as directConnection, replicaSet, maxPoolSize and authSource reach the driver.
Connection lifecycle fixes: