#7038·beads

server mode: after the gate's "pull on the old binary, then upgrade" path, read-only commands fail on leases.granted_node until something opens the store read-write

Author: seanmartinsmithCreated Sep 30, 2026Updated Sep 30, 2026
Labelskind/bugpriority/p1

the gate tells non-migrator clones (remote_migrate_gate.go:312 at v1.3.0, :444 on main 448c4b862): "after the migrator pushes run bd dolt pull on each before upgrading it - its upgrade then has nothing to migrate". in server mode that holds for the main series, not the clone-local one. a clone that follows it sits at main 66 / ignored 13 (any pre-1.3.0 store is <= 13) and on 1.3.0:

Error: search count issues: Error 1105 (HY000): table "leases" does not have column "granted_node"

(granted_node is ignored/0016)

repro

bd 1.3.0 (f45b249ce), old binary = main build at 1823f47ae (55/13), dolt sql-server 2.2.1, shared server + dolt remote. 8/8 dbs on a linux (wsl2) consumer, 14 of 17 on a macos one, and in a sandbox:

  1. migrator: bd migrate schema --force, bd dolt push
  2. consumer, old binary: bd dolt pull -> main 66, ignored 13
  3. swap to 1.3.0
  4. bd list -> error above. bd list again -> same, ignored still 13
  5. bd sql "SELECT 1" -> ignored 14-26 apply, bd list works

why

list/ready/show/count/search/blocked are in readOnlyCommands (cmd/bd/main.go:174) and in server mode a read-only open doesn't run the ignored pass (same as #6929 notes). bd sql isn't read-only, so it migrates.

the part i couldn't pin down: autoMigrateOnVersionBump runs for read-only commands too (main.go:1597-1610 at v1.3.0) and opens writable. on the mac, 3 of 17 dbs DID get the clone-local series during that same first bd list (local_metadata got bd_version=1.3.0), the other 14 didn't (local_metadata empty). same config on both groups. no BD_DEBUG capture, so i can't say whether that open failed quietly (#6929's first defect) or never ran

fix shape

  • the clone-local series needs no consent (the gate only counts main versions), so a server-mode read-only open, or reliably the version-bump open, could apply it
  • at minimum the gate text and upgrading.md: "then run one read-write command per db (e.g. bd sql "SELECT 1")", and the raw column error could name the pending clone-local migrations

related, not the same: #6572 (reads fail with main migrations pending), #6687 (bootstrap adopt no-ops), #6929 (version-bump auto-migrate swallows its failure)