denodrivers / denodrivers/mongo

feat: Automatic reconnect

Open
#278 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
TypeScript
Stars
511
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Many mongodb drivers implement a reconnect for when a connection to remote server is dropped. This is needed for any long standing use, like on servers to recover from any loss of connectivity or db server reboot. On desktop the connection is lost when device goes to sleep, also calling for a reconnect.

At the moment I guess we can and should wrap all mongodb calls in try/catch in user code, and manually attempt to reconnect as needed. But this is somewhat nontrivial problem many end users of the driver may struggle with. Having this functionality built in the driver would be a nice feature.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, entry points, or tests. Start by tracing the driver's connection lifecycle and MongoDB call paths, then determine how dropped connections and device sleep should trigger reconnects. Done means the driver automatically recovers connectivity without requiring users to wrap calls and reconnect manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, mongodb, typescript
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.