bus5 B5 (A-107): the keeper's process answers mesh-broker's snapshot verbs itself through AnswerSeat
snapshot-get, snapshot-restore, snapshot-restore-cancel and snapshot-remove are answered by the keeper's process with the proved caller; it publishes snapshot-get's chunks and hears their acks on its own subscription, and acts at once with no hand-over through requests (the record of a running restore is written before it runs). The tools bundle keeps its tools, nats_snapshots among them. The protected refusal and the whole test's case (send, restore in place, removal) stay. Builds: design 47 G A-107 (G-20-lead-answers), §681 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -37,7 +37,7 @@ import (
|
||||
// started by the node-engine as the manifest's process keeper. It reads the fill every minute from its start, asks the
|
||||
// indexer's first view once, then hears manifest-accepted and the operator's decided on its durable consumer, makes what
|
||||
// each verdict asks for, and acts on the persons' requests its tools put in its own state requests (requests.go) as they
|
||||
// are written or answered. It serves nothing (ADR 0436 §3).
|
||||
// are written or answered. It answers the seat mesh-broker's snapshot verbs itself (snapshots.go; design 47 G A-107).
|
||||
|
||||
// AcceptedOf reads a manifest-accepted body: the seat mesh-catalog's typed event, with the indexer's revision of the
|
||||
// verdict when the event carries it (0 from an indexer that does not say it).
|
||||
@@ -280,6 +280,12 @@ func runKeeper(ctx context.Context, getenv func(string) string, logOut io.Writer
|
||||
SnapshotsCap: number(getenv, "MESH_NATS_SNAPSHOTS_CAP", keeper.DefaultSnapshotsCap),
|
||||
SnapshotKeepDays: int(number(getenv, "MESH_NATS_SNAPSHOT_KEEP_DAYS", keeper.DefaultSnapshotKeepDays)),
|
||||
}
|
||||
// The process answers the seat mesh-broker's snapshot verbs itself (design 47 G §681, A-107), with the caller the bus proved.
|
||||
stopAnswers, err := conn.AnswerSeat(meshbroker.Seat, snapshotAnswers(k, heldRequest(k.Store), keeperSnapshots(js, nc, account, logger.Printf)))
|
||||
if err != nil {
|
||||
return fmt.Errorf("the seat %s's snapshot verbs cannot be answered: %w", meshbroker.Seat, err)
|
||||
}
|
||||
defer stopAnswers()
|
||||
logger.Printf("started on the account %s: asking %s.%s for the first view", account.User, keeper.FirstViewOwner, keeper.FirstViewVerb)
|
||||
return Keep(ctx, k, hearer(js, account, logger.Printf), requestsOf(conn), logger.Printf)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user