Doltgres → DoltHub push reports success but data is unrecoverable (should fail loudly)
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 73
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 129
Description
## Summary
Pushing a **Doltgres** database to a **DoltHub** remote via `dolt_push` **reports success**, but the data cannot be cloned back — so the push silently loses data.
We understand from the README that DoltHub is not a supported Doltgres remote (only `file://`, `aws://`, `gs://`, `oci://`, `http(s)://` ChunkStoreService, `sql-server`). The problem is that the unsupported push **succeeds silently** instead of failing up front. We only discovered it was unsupported *after* our source volume was lost and we tried to clone the data back.
**Ask:** if Doltgres → DoltHub is unsupported, the push should **fail loudly at push time** rather than succeed and leave unrecoverable data on the remote.
## What happens
1. `SELECT dolt_push('origin','main')` from a Doltgres server, remote = `https://doltremoteapi.dolthub.com//` → **returns success**. Chunks are accepted (~12,660 uploaded).
2. Cloning back from a Doltgres client fails on a missing table file:
```
SELECT dolt_clone('/');
→ ERROR: dangling ref: found dangling references to HashSet { }
```
The same file blocks every branch, so it looks like a shared/base object, not a tip-only one.
3. Plain `dolt` can't read the repo at all: `could not find root value: main; table has unknown fields` / `cannot walk a Doltgres root value from within Dolt`. DoltHub's web SQL API returns `table has unknown fields` for every query.
## Hypothesis
DoltHub runs Dolt, which can't walk a Doltgres root value, so its background GC can't mark Doltgres chunks reachable and collects a live table file. If that's right, this is a data-loss footgun for **any** Doltgres repo pushed to DoltHub.
## Repro
```bash
# push side: a Doltgres server with a DoltHub https remote added, then dolt_push — succeeds
# pull side:
docker run --rm -p 5439:5432 dolthub/doltgresql:0.57.3 &
PGPASSWORD=password psql -h 127.0.0.1 -p 5439 -U postgres -d postgres \
-c "SELECT dolt_clone('/');"
# → dangling ref
```
## Suggested fix
Detect DoltHub/DoltLab remotes on the Doltgres push path and **reject the push with a clear error** ("DoltHub is not a supported Doltgres remote; use file://, S3, GCS, OCI, or a Doltgres sql-server remote") so users can't silently strand data there.
Contributor guide
Research direction
Start at the dolt_push implementation and the remote URL handling for DoltHub and DoltLab. Reproduce the SQL push against the https remote, then verify that unsupported remotes are rejected before chunks are uploaded with a clear error explaining supported alternatives.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100