Skip to content

th-e814a9: raise Dolt sync bound 30s→300s so large pushes can complete#184

Merged
brentrager merged 1 commit into
mainfrom
th-e814a9-dolt-sync-bound
Jul 10, 2026
Merged

th-e814a9: raise Dolt sync bound 30s→300s so large pushes can complete#184
brentrager merged 1 commit into
mainfrom
th-e814a9-dolt-sync-bound

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Problem

th pearls push/pull bounds every Dolt remote sync to 30s wallclock and SIGKILLs on deadline, returning a "retryable" error. But each retry restarts the same transfer from scratch and hits the same wall — so a legitimately large push can never complete.

Observed on Brent's machine: the smooai pearl store (303M — a post-gc 114M oldgen table + 169M git-remote-cache) took ~150s to upload over a home uplink and wedged on every bounded attempt. An unbounded push (SMOOTH_DOLT_SYNC_TIMEOUT_SECS=0) completed cleanly in ~2.5min; the follow-up incremental push then took 11s.

Why not an idle/stall timeout

smooth-dolt push runs CALL DOLT_PUSH(...) as a single synchronous SQL call with no progress stream — the upload is byte-silent on stdout/stderr for its entire duration. A stall detector keyed on output can't tell a healthy slow upload from a dead socket, so it would kill the good case too.

Fix

Raise DEFAULT_SYNC_TIMEOUT_SECS 30 → 300. The bound's only real job is preventing an infinite dead-socket wedge (a held noms LOCKError 1105: database is read only for other writers); 300s still caps that at 5 min while clearing observed large pushes. Normal incremental pushes finish in ~10s and are unaffected. The SMOOTH_DOLT_SYNC_TIMEOUT_SECS override (and 0 = unbounded) is unchanged.

Also corrects a stale doc comment: the sync uses in-process go-git via DOLT_PUSH, it does not shell out to a git subprocess.

Tests

  • parse_garbage_falls_back_to_default_not_unbounded updated to assert the 300s fallback.
  • Full smooai-smooth-pearls suite: 148 passed; cargo fmt --check clean; cargo clippy exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_015zP7baF7SHR89bPftsX1kp

The 30s wallclock timeout on smooth-dolt push/pull SIGKILLs any transfer
exceeding it and returns a "retryable" error, but every retry restarts
the same transfer from scratch and hits the same wall — so a legitimately
large push can NEVER complete. Observed: a 303M smooai pearl store
re-uploading a post-gc 114M oldgen table took ~150s over a home uplink
and wedged on every attempt; an unbounded push completed cleanly.

DOLT_PUSH is a single synchronous SQL call with no progress stream, so
the upload is byte-silent for its whole duration — a stall/idle detector
on stdout/stderr is unworkable (healthy upload looks identical to a dead
socket). The bound's only real job is preventing an *infinite*
dead-socket wedge, which 300s still does; normal incremental pushes
finish in ~10s and are unaffected. SMOOTH_DOLT_SYNC_TIMEOUT_SECS override
(and 0 = unbounded) unchanged.

Also corrects the doc comment: the sync uses in-process go-git via
DOLT_PUSH, it does not shell out to a git subprocess.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zP7baF7SHR89bPftsX1kp
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 18a83f6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager brentrager enabled auto-merge (squash) July 10, 2026 20:49
@brentrager brentrager merged commit c1157fe into main Jul 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant