The have bucket takes a node's whole facts, as large as a chain value, never cut (issue 1162)
mesh/merge-gate head 75a27ec1a4bc merged into trunk 85af245f1af1 — pass: builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus…
mesh/repo-check head 75a27ec1a4bc merged into trunk 85af245f1af1 — pass: its merge-check.sh passed
mesh/delivery delivered
mesh/merge-gate head 75a27ec1a4bc merged into trunk 85af245f1af1 — pass: builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus…
mesh/repo-check head 75a27ec1a4bc merged into trunk 85af245f1af1 — pass: its merge-check.sh passed
mesh/delivery delivered
A node's own key carries its profile and was refused at 4 KiB on novox and g14 (nats: message size exceeds maximum allowed).
This commit is contained in:
@@ -449,7 +449,9 @@ func EnsureLeaseBucket(ctx context.Context, js jetstream.JetStream) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HaveBucketConfig is the options of the have bucket (novox/hq ADR 0429 §1): delivery.HaveHistory revisions of each
|
// HaveBucketConfig is the options of the have bucket (novox/hq ADR 0429 §1): delivery.HaveHistory revisions of each
|
||||||
// key, no age, a value under a kilobyte (a have is JSON of about 500 bytes), 64 MiB on disk like the assignments.
|
// key, no age, 64 MiB on disk like the assignments. A module's have is JSON of about 500 bytes, but a node's own key
|
||||||
|
// carries its whole facts (its profile among them), several kilobytes on a desktop: a value is as large as the chain's
|
||||||
|
// buckets take, since a value is never cut (novox/hq ADR 0408 §6, issue 1162).
|
||||||
func HaveBucketConfig() jetstream.KeyValueConfig {
|
func HaveBucketConfig() jetstream.KeyValueConfig {
|
||||||
return jetstream.KeyValueConfig{
|
return jetstream.KeyValueConfig{
|
||||||
Bucket: delivery.HaveBucket,
|
Bucket: delivery.HaveBucket,
|
||||||
@@ -457,7 +459,7 @@ func HaveBucketConfig() jetstream.KeyValueConfig {
|
|||||||
"own facts) (novox/hq ADR 0429, design 47): written by each machine's node-engine under its own node's keys " +
|
"own facts) (novox/hq ADR 0429, design 47): written by each machine's node-engine under its own node's keys " +
|
||||||
"alone, never by the controller; read by the delivery view and the watchman",
|
"alone, never by the controller; read by the delivery view and the watchman",
|
||||||
History: delivery.HaveHistory,
|
History: delivery.HaveHistory,
|
||||||
MaxValueSize: 4 << 10,
|
MaxValueSize: ChainValueBytes,
|
||||||
MaxBytes: 64 << 20,
|
MaxBytes: 64 << 20,
|
||||||
Storage: jetstream.FileStorage,
|
Storage: jetstream.FileStorage,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,3 +104,12 @@ func TestAModuleReadingHaveAssignmentsAndBuildsReadsAndWritesNone(t *testing.T)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A node's own key carries its whole facts (its profile among them), several kilobytes on a desktop: the have
|
||||||
|
// bucket takes any value the chain's buckets take, since a value is never cut (novox/hq ADR 0408 §6, issue 1162).
|
||||||
|
// 1162/AC1
|
||||||
|
func TestTheHaveBucketTakesAValueAsLargeAsTheChains(t *testing.T) {
|
||||||
|
if got := HaveBucketConfig().MaxValueSize; got != ChainValueBytes {
|
||||||
|
t.Fatalf("the have bucket takes values up to %d bytes, the chain's up to %d", got, ChainValueBytes)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user