mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
A volume whose durable root sits on the authority store's file system shares its jbd2 journal: under a WAL fsync storm the lease extensions lag, grants clamp to the durable horizon and leases run out. - core/storeident: (machine-id, st_dev) identity of a directory; unknown never matches. - Heartbeats carry the durable root's identity (machine_id, durable_root_dev); the master compares it with its authority store, logs and counts co-located nodes once per detection. - --strict-journal-isolation (default off = alarm only): refuses heartbeats of a co-located node that serves no volume (durable state decides), and refuses PlaceWorkspace/MoveWorkspace and new product-loop placements onto co-located nodes. - Publisher: headroom alarm while an extension is pending and headroom < 1.125 TTL (before the first clamp), clamp counters (total, last minute), min headroom at grants, lazy per-minute summary; WorkspaceLeaseStats snapshot. - --status-listen (loopback only): GET /status/workspace-lease JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
652 B
Go
20 lines
652 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/seaweedfs/seaweed-block/core/storeident"
|
|
)
|
|
|
|
// The host config carries the durable root's file-system identity (what the
|
|
// heartbeat reports); a memback run (no durable root) reports unknown.
|
|
func TestHostConfigStorageIdentityFromDurableRoot(t *testing.T) {
|
|
root := t.TempDir()
|
|
if got, want := hostConfig(flags{durableRoot: root}, nil).StorageIdentity, storeident.Of(root); got != want {
|
|
t.Fatalf("durable root identity = %+v, want %+v", got, want)
|
|
}
|
|
if got := hostConfig(flags{}, nil).StorageIdentity; got != (storeident.Identity{}) {
|
|
t.Fatalf("memback identity = %+v, want unknown", got)
|
|
}
|
|
}
|