node-engine: the composer judges a changed want by its fingerprint, version, parts and keeping node, so a want that gains its parts is composed (design 47 G §525)
This commit is contained in:
@@ -723,7 +723,9 @@ func (c *Composer) entry(bucket, key string) (v any, has, known bool) {
|
||||
defer c.mu.Unlock()
|
||||
switch bucket {
|
||||
case buckets.Wants:
|
||||
// A want is composed by its fingerprint alone (fingerprints); its words, rule and newest change nothing composed.
|
||||
// A want is composed by its fingerprint, version, parts and keeping node (design 47 G §525); its words, rule and newest
|
||||
// change nothing composed. Judged by its fingerprint alone, a want that gained its parts at the same fingerprint asked no
|
||||
// pass, and the agent waited for a composition never made (lead-47 2026-11-16, the indexer on novox).
|
||||
module := agent.NodeModule
|
||||
if _, ok := meshwants.ParseWantsByWantNodeNodeKey(key); !ok {
|
||||
node, m, ok := meshwants.ParseWantsByWantNodeModuleKey(key)
|
||||
@@ -733,7 +735,10 @@ func (c *Composer) entry(bucket, key string) (v any, has, known bool) {
|
||||
module = m
|
||||
}
|
||||
w, ok := c.wants[module]
|
||||
return w.Fp, ok, true
|
||||
return struct {
|
||||
Fp, Version, KeptOn string
|
||||
Parts map[string]string
|
||||
}{w.Fp, w.Version, w.KeptOn, w.Parts}, ok, true
|
||||
case buckets.Assignments:
|
||||
// Any key of a node, its node key, a module key or its legacy key, stands for the node's whole assignment: a
|
||||
// module key written before its node key names it changes nothing composed.
|
||||
|
||||
Reference in New Issue
Block a user