Handle transient database-not-found during managed Dolt restart
- Dominant language
- Go
- Stars
- 34
- Forks
- 11
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 5
Description
## Problem
When a managed Dolt server restarts, a client can briefly observe the server as reachable while a database probe reports "database not found". In gastownhall/beads#4449, the proposed beads-side workaround retries that DB-not-found probe with exponential backoff before falling through to bootstrap/init.
That restart tolerance is real and useful, but the retry belongs at the Dolt driver/storage boundary rather than in beads bootstrap code. Beads should not need storage-engine-specific sleep/retry loops to distinguish "database is genuinely absent" from "the server is still coming back after restart".
## Why this should live in the driver
Beads can only infer this state indirectly from driver/server errors. If beads owns the retry loop, every caller has to duplicate driver-specific knowledge and tune backoff around managed-Dolt restart behavior.
There is also a concrete product cost to doing it in beads: in shared-server mode, a first-ever bootstrap for a new project on a machine whose shared server already hosts other project databases can eat the full backoff window before falling through to init. The submitted beads-side loop was 10s + 20s + 40s.
## Requested behavior
Please consider one of these driver-level fixes:
- make transient restart/not-ready states distinguishable from a genuinely absent database;
- retry known transient DB-not-found probes inside the driver with bounded backoff; or
- expose an explicit driver option/capability so higher layers can request restart-tolerant open/probe behavior without hardcoding Dolt-server error handling.
## Source context
This came from the Layer 2 portion of gastownhall/beads#4449. Beads plans to keep the Layer 1 URL guard from that PR, but route the managed-Dolt restart tolerance here rather than landing a beads-side storage workaround.
_codex-gpt-5.5-high on behalf of matt wilkie_
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or driver entry points are named. Start at the driver/storage boundary described in the issue and read the restart context from gastownhall/beads#4449. Done means transient managed-Dolt restart states are handled or exposed by the driver, without a beads-side storage-specific retry loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100