Skip to content

Commit cc90bd2

Browse files
docs: Add operational note and fix step description for rebuild-storage
Note that graph-node must be stopped before running the command, making explicit the single-operator assumption baked into the check-then-act flow. Also correct the DROP SCHEMA step description to remove the stale IF EXISTS qualifier.
1 parent 6d3de7e commit cc90bd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/graphman.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,8 @@ The `chain rebuild-storage` command recovers from a situation where a chain's st
467467
(e.g. `chain42`) has been dropped or corrupted on the shard but the chain's metadata in
468468
`public.chains` still exists. This can happen after manual database operations or partial failures.
469469

470+
> **Operational requirement:** Stop graph-node before running this command.
471+
470472
The command behaves differently depending on the state of the storage:
471473

472474
**Storage missing** (non-destructive): the command silently rebuilds the schema and resets
@@ -477,7 +479,7 @@ existing schema and rebuilding it from scratch. Use `--force` to skip the prompt
477479

478480
In both cases, the command performs the following steps in a single transaction:
479481

480-
1. Drops the existing storage schema if present (`DROP SCHEMA IF EXISTS ... CASCADE`).
482+
1. Drops the existing storage schema if present (`DROP SCHEMA ... CASCADE`).
481483
2. Upserts the chain's row in `ethereum_networks` on the shard: inserts if missing, or repairs
482484
identity metadata (`namespace`, `net_version`, `genesis_block_hash`) and resets head tracking
483485
columns (`head_block_hash`, `head_block_number`, `head_block_cursor`) to `NULL` if the row exists.

0 commit comments

Comments
 (0)