diff --git a/seaweed-block/docs/troubleshooting.md b/seaweed-block/docs/troubleshooting.md index bfe440e11e..037e7c0bb2 100644 --- a/seaweed-block/docs/troubleshooting.md +++ b/seaweed-block/docs/troubleshooting.md @@ -167,3 +167,23 @@ difference plus half the round trip reaches half of the shell's `-max-clock-skew on each volume host. **Fix:** [clock safety requirement](operator-guide.md#clock-safety-requirement). + +## Reading HEAD write logs + +Every HEAD write that the filer acknowledges is logged by the process that made it: blockvolume for a holder's writes, blockmaster for a volume's create, restore and delete. One line per write: + +```text +layout: HEAD write level=INFO volume="v1" volume_id= gen=12->13 head_write=commit session="" epoch=3 holder="s1" claim="" activity=idle state=live current="" position=4096 snapshots=2 dependents=0 took_ms=1.234 +``` + +- **`head_write`** says why HEAD was written. It is one of: `create`, `claim`, `start-rollback-snap`, `start-rollback-clean`, `session-begin`, `session-rollback`, `commit`, `snapshot-unchanged`, `stop-abort`, `clean-begin`, `clean-end`, `snapshot-retire`, `snapshot-delete`, `dependent-add`, `delete-marking`, `delete-done`, `dependent-release`, `tombstone`. +- **`gen=A->B`** is HEAD's generation before and after the write. +- **`took_ms`** is the time the conditional write took. + +A write whose answer was lost is logged at WARN, because it may or may not have applied: + +```text +layout: HEAD write level=WARN outcome=unknown volume="v1" volume_id= expected_gen=12 head_write=commit session="" took_ms=2000.000 err="" +``` + +The next attempt reads HEAD and settles it. A definite refusal by the filer (the generation moved, the HEAD exists or is missing) is not an unknown outcome and is not logged here. Several `outcome=unknown` lines in a row for one volume mean the filer is not answering HEAD writes: see [filer.single](#filersingle).