status schema: durable volume, chunk and write profile field comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 5.5 committed 2026-11-20 23:35:28 -08:00
1 parent 671a5eebc8
commit 23c23b72aa
3 files changed
+138 -138

No files matched your search

+23 -23
View File
@@ -291,23 +291,23 @@ type volHandle struct {
// handle. It intentionally exposes lineage and readiness facts without giving
// callers a control surface.
type VolumeStatus struct {
VolumeID string
Path string
Impl string
ReplicaID string
Epoch uint64
EndpointVersion uint64
Latched bool
Operational bool
FrontierKnown bool
DurableLSN uint64
RetainedLSN uint64
HeadLSN uint64
Evidence string
Closed bool
WriteProfile WriteProfileStatus
DataSync *storage.DataSyncStatus `json:",omitempty"`
CheckpointPersistence *storage.CheckpointPersistenceStatus `json:",omitempty"`
VolumeID string // the volume
Path string // its store path under --durable-root
Impl string // the durable implementation (walstore, smartwal, walstore-chunk, ...)
ReplicaID string // the replica this store holds
Epoch uint64 // the epoch the store is latched to; 0 before an assignment
EndpointVersion uint64 // the endpoint version it is latched to
Latched bool // an assignment latched the store (epoch and endpoint version set)
Operational bool // the backend admits I/O now
FrontierKnown bool // DurableLSN, RetainedLSN and HeadLSN are the store's current boundaries
DurableLSN uint64 // R: the newest LSN made durable
RetainedLSN uint64 // S: the oldest LSN the WAL still retains
HeadLSN uint64 // H: the newest LSN written
Evidence string // why the backend is or is not operational
Closed bool // the backend was closed
WriteProfile WriteProfileStatus // write-path counters since start
DataSync *storage.DataSyncStatus `json:",omitempty"` // data-file sync state, where the store has one
CheckpointPersistence *storage.CheckpointPersistenceStatus `json:",omitempty"` // checkpoint persistence state, where the store has one
// Chunk is the chunk layer's state and cut counters; walstore-chunk
// volumes only.
Chunk *ChunkStatus
@@ -322,12 +322,12 @@ type VolumeStatus struct {
// AwaitingAuthority: recovered, the layer waits for master authority to
// attach. Stats is zero until the layer is attached.
type ChunkStatus struct {
Attached bool
AwaitingAuthority bool
Fenced bool
RemoteLSN uint64
Stats storage.ChunkLayerStats
HostBudget any `json:",omitempty"`
Attached bool // the chunk layer is attached to the remote
AwaitingAuthority bool // recovered; the layer waits for master authority to attach
Fenced bool // a newer holder fenced this layer: it publishes nothing
RemoteLSN uint64 // the LSN of the remote HEAD (what the remote holds durably)
Stats storage.ChunkLayerStats // the layer's cut counters; zero until attached
HostBudget any `json:",omitempty"` // the host background-cut budget state, with --host-limit-dir
}
// NewDurableProvider constructs a provider. view is the ONLY
@@ -12,55 +12,55 @@ import (
// It is not a performance API; callers use it to prove which product-owned
// path observed the write and roughly where time accumulated.
type WriteProfileStatus struct {
DurabilityLatency DurabilityLatencyStatus
TargetWriteOps uint64
TargetWriteBytes uint64
TargetWriteRequestMaxBytes uint64
TargetWriteDurationNanos uint64
BackendWriteRequestOps uint64
BackendWriteRequestBytes uint64
BackendWriteRequestMaxBytes uint64
BackendWriteOps uint64
BackendWriteBytes uint64
BackendWriteDurationNanos uint64
BackendStorageWriteCalls uint64
BackendStorageWriteBlocks uint64
BackendStorageBatchCalls uint64
BackendStorageBatchBlocks uint64
BackendFullBlockBatchCalls uint64
BackendFullBlockBatchBlocks uint64
BackendFullBlockBatchMax uint64
WALCopyOps uint64
WALCopyBytes uint64
WALCopyDurationNanos uint64
WALEncodeOps uint64
WALEncodeBytes uint64
WALEncodeDurationNanos uint64
WALChecksumOps uint64
WALChecksumBytes uint64
WALChecksumDurationNanos uint64
WALAppendOps uint64
WALAppendBytes uint64
WALAppendDurationNanos uint64
WALAppendLockWaitOps uint64
WALAppendLockWaitNanos uint64
WriteCommitLockWaitOps uint64
WriteCommitLockWaitNanos uint64
WALAppendWriteAtCalls uint64
WALAppendWriteAtBytes uint64
WALAppendWriteAtMaxBytes uint64
WALAppendWrapCount uint64
WALAppendPaddingBytes uint64
DirtyMapUpdateOps uint64
DirtyMapUpdateDurationNanos uint64
BackendSyncOps uint64
BackendSyncDurationNanos uint64
DurabilityLatency DurabilityLatencyStatus // latency distributions of writes, flushes and syncs
TargetWriteOps uint64 // writes the protocol target handed to the volume
TargetWriteBytes uint64 // their bytes
TargetWriteRequestMaxBytes uint64 // the largest of them
TargetWriteDurationNanos uint64 // their total time at the target
BackendWriteRequestOps uint64 // write requests that entered the durable backend
BackendWriteRequestBytes uint64 // their bytes
BackendWriteRequestMaxBytes uint64 // the largest of them
BackendWriteOps uint64 // backend writes completed
BackendWriteBytes uint64 // their bytes
BackendWriteDurationNanos uint64 // their total time
BackendStorageWriteCalls uint64 // single-write calls into the store
BackendStorageWriteBlocks uint64 // blocks they wrote
BackendStorageBatchCalls uint64 // batch-write calls into the store
BackendStorageBatchBlocks uint64 // blocks they wrote
BackendFullBlockBatchCalls uint64 // batch calls made only of whole blocks
BackendFullBlockBatchBlocks uint64 // blocks they wrote
BackendFullBlockBatchMax uint64 // the largest such batch, in blocks
WALCopyOps uint64 // WAL record payload copies
WALCopyBytes uint64 // their bytes
WALCopyDurationNanos uint64 // their total time
WALEncodeOps uint64 // WAL record encodes
WALEncodeBytes uint64 // their bytes
WALEncodeDurationNanos uint64 // their total time
WALChecksumOps uint64 // WAL record checksums
WALChecksumBytes uint64 // their bytes
WALChecksumDurationNanos uint64 // their total time
WALAppendOps uint64 // WAL appends
WALAppendBytes uint64 // their bytes
WALAppendDurationNanos uint64 // their total time
WALAppendLockWaitOps uint64 // appends that waited for the WAL append lock
WALAppendLockWaitNanos uint64 // their total wait
WriteCommitLockWaitOps uint64 // writes that waited for the commit lock
WriteCommitLockWaitNanos uint64 // their total wait
WALAppendWriteAtCalls uint64 // file WriteAt calls made by WAL appends
WALAppendWriteAtBytes uint64 // their bytes
WALAppendWriteAtMaxBytes uint64 // the largest of them
WALAppendWrapCount uint64 // times the WAL append wrapped to the start of the log
WALAppendPaddingBytes uint64 // padding bytes written at those wraps
DirtyMapUpdateOps uint64 // dirty-map updates after writes
DirtyMapUpdateDurationNanos uint64 // their total time
BackendSyncOps uint64 // backend syncs (flush, FUA, explicit sync)
BackendSyncDurationNanos uint64 // their total time
}
type DurabilityLatencyStatus struct {
Frontend iolatency.RequestStatus
BackendSync iolatency.Distribution
WAL *storage.DurabilityLatencyStatus `json:",omitempty"`
Frontend iolatency.RequestStatus // per-request latency at the frontend, by stage
BackendSync iolatency.Distribution // latency of backend syncs
WAL *storage.DurabilityLatencyStatus `json:",omitempty"` // the WAL's own sync latency, where the store reports it
}
type writeProfile struct {
+69 -69
View File
@@ -67,23 +67,23 @@ Durable store state of the served volume. Go type `volume.durableStatusBody`.
| `ReplicaID` | string | this host's replica |
| `VolumeCount` | int | number of entries in Volumes |
| `Volumes[]` | object | the durable store state of the served volume |
| `Volumes[].VolumeID` | string | — |
| `Volumes[].Path` | string | — |
| `Volumes[].Impl` | string | — |
| `Volumes[].ReplicaID` | string | — |
| `Volumes[].Epoch` | uint64 | — |
| `Volumes[].EndpointVersion` | uint64 | — |
| `Volumes[].Latched` | bool | — |
| `Volumes[].Operational` | bool | — |
| `Volumes[].FrontierKnown` | bool | — |
| `Volumes[].DurableLSN` | uint64 | — |
| `Volumes[].RetainedLSN` | uint64 | — |
| `Volumes[].HeadLSN` | uint64 | — |
| `Volumes[].Evidence` | string | — |
| `Volumes[].Closed` | bool | — |
| `Volumes[].WriteProfile` | object | — |
| `Volumes[].WriteProfile.DurabilityLatency` | object | — |
| `Volumes[].WriteProfile.DurabilityLatency.Frontend` | object | — |
| `Volumes[].VolumeID` | string | the volume |
| `Volumes[].Path` | string | its store path under --durable-root |
| `Volumes[].Impl` | string | the durable implementation (walstore, smartwal, walstore-chunk, ...) |
| `Volumes[].ReplicaID` | string | the replica this store holds |
| `Volumes[].Epoch` | uint64 | the epoch the store is latched to; 0 before an assignment |
| `Volumes[].EndpointVersion` | uint64 | the endpoint version it is latched to |
| `Volumes[].Latched` | bool | an assignment latched the store (epoch and endpoint version set) |
| `Volumes[].Operational` | bool | the backend admits I/O now |
| `Volumes[].FrontierKnown` | bool | DurableLSN, RetainedLSN and HeadLSN are the store's current boundaries |
| `Volumes[].DurableLSN` | uint64 | R: the newest LSN made durable |
| `Volumes[].RetainedLSN` | uint64 | S: the oldest LSN the WAL still retains |
| `Volumes[].HeadLSN` | uint64 | H: the newest LSN written |
| `Volumes[].Evidence` | string | why the backend is or is not operational |
| `Volumes[].Closed` | bool | the backend was closed |
| `Volumes[].WriteProfile` | object | write-path counters since start |
| `Volumes[].WriteProfile.DurabilityLatency` | object | latency distributions of writes, flushes and syncs |
| `Volumes[].WriteProfile.DurabilityLatency.Frontend` | object | per-request latency at the frontend, by stage |
| `Volumes[].WriteProfile.DurabilityLatency.Frontend.WriteTotal` | object | — |
| `Volumes[].WriteProfile.DurabilityLatency.Frontend.WriteTotal.Count` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.Frontend.WriteTotal.SumNanos` | uint64 | — |
@@ -124,13 +124,13 @@ Durable store state of the served volume. Go type `volume.durableStatusBody`.
| `Volumes[].WriteProfile.DurabilityLatency.Frontend.Flushes` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.Frontend.FUAWrites` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.Frontend.Failed` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.BackendSync` | object | — |
| `Volumes[].WriteProfile.DurabilityLatency.BackendSync` | object | latency of backend syncs |
| `Volumes[].WriteProfile.DurabilityLatency.BackendSync.Count` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.BackendSync.SumNanos` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.BackendSync.P50UpperNanos` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.BackendSync.P99UpperNanos` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.BackendSync.Buckets[]` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.WAL` | object | — (omitted when empty) |
| `Volumes[].WriteProfile.DurabilityLatency.WAL` | object | the WAL's own sync latency, where the store reports it (omitted when empty) |
| `Volumes[].WriteProfile.DurabilityLatency.WAL.WALAppend` | object | — |
| `Volumes[].WriteProfile.DurabilityLatency.WAL.WALAppend.Count` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.WAL.WALAppend.SumNanos` | uint64 | — |
@@ -149,52 +149,52 @@ Durable store state of the served volume. Go type `volume.durableStatusBody`.
| `Volumes[].WriteProfile.DurabilityLatency.WAL.FileSync.P50UpperNanos` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.WAL.FileSync.P99UpperNanos` | uint64 | — |
| `Volumes[].WriteProfile.DurabilityLatency.WAL.FileSync.Buckets[]` | uint64 | — |
| `Volumes[].WriteProfile.TargetWriteOps` | uint64 | — |
| `Volumes[].WriteProfile.TargetWriteBytes` | uint64 | — |
| `Volumes[].WriteProfile.TargetWriteRequestMaxBytes` | uint64 | — |
| `Volumes[].WriteProfile.TargetWriteDurationNanos` | uint64 | — |
| `Volumes[].WriteProfile.BackendWriteRequestOps` | uint64 | — |
| `Volumes[].WriteProfile.BackendWriteRequestBytes` | uint64 | — |
| `Volumes[].WriteProfile.BackendWriteRequestMaxBytes` | uint64 | — |
| `Volumes[].WriteProfile.BackendWriteOps` | uint64 | — |
| `Volumes[].WriteProfile.BackendWriteBytes` | uint64 | — |
| `Volumes[].WriteProfile.BackendWriteDurationNanos` | uint64 | — |
| `Volumes[].WriteProfile.BackendStorageWriteCalls` | uint64 | — |
| `Volumes[].WriteProfile.BackendStorageWriteBlocks` | uint64 | — |
| `Volumes[].WriteProfile.BackendStorageBatchCalls` | uint64 | — |
| `Volumes[].WriteProfile.BackendStorageBatchBlocks` | uint64 | — |
| `Volumes[].WriteProfile.BackendFullBlockBatchCalls` | uint64 | — |
| `Volumes[].WriteProfile.BackendFullBlockBatchBlocks` | uint64 | — |
| `Volumes[].WriteProfile.BackendFullBlockBatchMax` | uint64 | — |
| `Volumes[].WriteProfile.WALCopyOps` | uint64 | — |
| `Volumes[].WriteProfile.WALCopyBytes` | uint64 | — |
| `Volumes[].WriteProfile.WALCopyDurationNanos` | uint64 | — |
| `Volumes[].WriteProfile.WALEncodeOps` | uint64 | — |
| `Volumes[].WriteProfile.WALEncodeBytes` | uint64 | — |
| `Volumes[].WriteProfile.WALEncodeDurationNanos` | uint64 | — |
| `Volumes[].WriteProfile.WALChecksumOps` | uint64 | — |
| `Volumes[].WriteProfile.WALChecksumBytes` | uint64 | — |
| `Volumes[].WriteProfile.WALChecksumDurationNanos` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendOps` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendBytes` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendDurationNanos` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendLockWaitOps` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendLockWaitNanos` | uint64 | — |
| `Volumes[].WriteProfile.WriteCommitLockWaitOps` | uint64 | — |
| `Volumes[].WriteProfile.WriteCommitLockWaitNanos` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendWriteAtCalls` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendWriteAtBytes` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendWriteAtMaxBytes` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendWrapCount` | uint64 | — |
| `Volumes[].WriteProfile.WALAppendPaddingBytes` | uint64 | — |
| `Volumes[].WriteProfile.DirtyMapUpdateOps` | uint64 | — |
| `Volumes[].WriteProfile.DirtyMapUpdateDurationNanos` | uint64 | — |
| `Volumes[].WriteProfile.BackendSyncOps` | uint64 | — |
| `Volumes[].WriteProfile.BackendSyncDurationNanos` | uint64 | — |
| `Volumes[].DataSync` | object | — (omitted when empty) |
| `Volumes[].WriteProfile.TargetWriteOps` | uint64 | writes the protocol target handed to the volume |
| `Volumes[].WriteProfile.TargetWriteBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.TargetWriteRequestMaxBytes` | uint64 | the largest of them |
| `Volumes[].WriteProfile.TargetWriteDurationNanos` | uint64 | their total time at the target |
| `Volumes[].WriteProfile.BackendWriteRequestOps` | uint64 | write requests that entered the durable backend |
| `Volumes[].WriteProfile.BackendWriteRequestBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.BackendWriteRequestMaxBytes` | uint64 | the largest of them |
| `Volumes[].WriteProfile.BackendWriteOps` | uint64 | backend writes completed |
| `Volumes[].WriteProfile.BackendWriteBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.BackendWriteDurationNanos` | uint64 | their total time |
| `Volumes[].WriteProfile.BackendStorageWriteCalls` | uint64 | single-write calls into the store |
| `Volumes[].WriteProfile.BackendStorageWriteBlocks` | uint64 | blocks they wrote |
| `Volumes[].WriteProfile.BackendStorageBatchCalls` | uint64 | batch-write calls into the store |
| `Volumes[].WriteProfile.BackendStorageBatchBlocks` | uint64 | blocks they wrote |
| `Volumes[].WriteProfile.BackendFullBlockBatchCalls` | uint64 | batch calls made only of whole blocks |
| `Volumes[].WriteProfile.BackendFullBlockBatchBlocks` | uint64 | blocks they wrote |
| `Volumes[].WriteProfile.BackendFullBlockBatchMax` | uint64 | the largest such batch, in blocks |
| `Volumes[].WriteProfile.WALCopyOps` | uint64 | WAL record payload copies |
| `Volumes[].WriteProfile.WALCopyBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.WALCopyDurationNanos` | uint64 | their total time |
| `Volumes[].WriteProfile.WALEncodeOps` | uint64 | WAL record encodes |
| `Volumes[].WriteProfile.WALEncodeBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.WALEncodeDurationNanos` | uint64 | their total time |
| `Volumes[].WriteProfile.WALChecksumOps` | uint64 | WAL record checksums |
| `Volumes[].WriteProfile.WALChecksumBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.WALChecksumDurationNanos` | uint64 | their total time |
| `Volumes[].WriteProfile.WALAppendOps` | uint64 | WAL appends |
| `Volumes[].WriteProfile.WALAppendBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.WALAppendDurationNanos` | uint64 | their total time |
| `Volumes[].WriteProfile.WALAppendLockWaitOps` | uint64 | appends that waited for the WAL append lock |
| `Volumes[].WriteProfile.WALAppendLockWaitNanos` | uint64 | their total wait |
| `Volumes[].WriteProfile.WriteCommitLockWaitOps` | uint64 | writes that waited for the commit lock |
| `Volumes[].WriteProfile.WriteCommitLockWaitNanos` | uint64 | their total wait |
| `Volumes[].WriteProfile.WALAppendWriteAtCalls` | uint64 | file WriteAt calls made by WAL appends |
| `Volumes[].WriteProfile.WALAppendWriteAtBytes` | uint64 | their bytes |
| `Volumes[].WriteProfile.WALAppendWriteAtMaxBytes` | uint64 | the largest of them |
| `Volumes[].WriteProfile.WALAppendWrapCount` | uint64 | times the WAL append wrapped to the start of the log |
| `Volumes[].WriteProfile.WALAppendPaddingBytes` | uint64 | padding bytes written at those wraps |
| `Volumes[].WriteProfile.DirtyMapUpdateOps` | uint64 | dirty-map updates after writes |
| `Volumes[].WriteProfile.DirtyMapUpdateDurationNanos` | uint64 | their total time |
| `Volumes[].WriteProfile.BackendSyncOps` | uint64 | backend syncs (flush, FUA, explicit sync) |
| `Volumes[].WriteProfile.BackendSyncDurationNanos` | uint64 | their total time |
| `Volumes[].DataSync` | object | data-file sync state, where the store has one (omitted when empty) |
| `Volumes[].DataSync.Mode` | string | — |
| `Volumes[].DataSync.Reason` | string | — |
| `Volumes[].CheckpointPersistence` | object | — (omitted when empty) |
| `Volumes[].CheckpointPersistence` | object | checkpoint persistence state, where the store has one (omitted when empty) |
| `Volumes[].CheckpointPersistence.Successes` | uint64 | — |
| `Volumes[].CheckpointPersistence.Refusals` | uint64 | — |
| `Volumes[].CheckpointPersistence.Failures` | uint64 | — |
@@ -202,11 +202,11 @@ Durable store state of the served volume. Go type `volume.durableStatusBody`.
| `Volumes[].CheckpointPersistence.Advances` | uint64 | — |
| `Volumes[].CheckpointPersistence.LastAdvance` | time (RFC 3339) | — |
| `Volumes[].Chunk` | object | Chunk is the chunk layer's state and cut counters; walstore-chunk volumes only. |
| `Volumes[].Chunk.Attached` | bool | — |
| `Volumes[].Chunk.AwaitingAuthority` | bool | — |
| `Volumes[].Chunk.Fenced` | bool | — |
| `Volumes[].Chunk.RemoteLSN` | uint64 | — |
| `Volumes[].Chunk.Stats` | object | — |
| `Volumes[].Chunk.Attached` | bool | the chunk layer is attached to the remote |
| `Volumes[].Chunk.AwaitingAuthority` | bool | recovered; the layer waits for master authority to attach |
| `Volumes[].Chunk.Fenced` | bool | a newer holder fenced this layer: it publishes nothing |
| `Volumes[].Chunk.RemoteLSN` | uint64 | the LSN of the remote HEAD (what the remote holds durably) |
| `Volumes[].Chunk.Stats` | object | the layer's cut counters; zero until attached |
| `Volumes[].Chunk.Stats.Hydration` | object | — |
| `Volumes[].Chunk.Stats.Hydration.WorkerLimit` | int | — |
| `Volumes[].Chunk.Stats.Hydration.QueueDepth` | int | — |
@@ -275,7 +275,7 @@ Durable store state of the served volume. Go type `volume.durableStatusBody`.
| `Volumes[].Chunk.Stats.LastCutNs` | int64 | — |
| `Volumes[].Chunk.Stats.BarrierOverBound` | uint64 | BarrierOverBound counts cuts whose barrier copied more than the bound after the staging rounds. |
| `Volumes[].Chunk.Stats.AbsentChunks` | int | AbsentChunks is the number of HEAD-named chunks still absent with a block not local (what HydrateAll would still fetch); 0 = fully local. |
| `Volumes[].Chunk.HostBudget` | interface | — (omitted when empty) |
| `Volumes[].Chunk.HostBudget` | interface | the host background-cut budget state, with --host-limit-dir (omitted when empty) |
| `Volumes[].Warnings[]` | string | Warnings are the store's typed recovery warnings (e.g. wal_hole_suspected, issue #51); they do not change readiness. HolesSuspected counts the recoveries that found a WAL hole. (omitted when empty) |
| `Volumes[].HolesSuspected` | uint64 | (group of `Warnings`) Warnings are the store's typed recovery warnings (e.g. wal_hole_suspected, issue #51); they do not change readiness. HolesSuspected counts the recoveries that found a WAL hole. (omitted when empty) |