Node agent: answer a proposal's candidate keys and follow the seat's placement, not the indexer's groups (issue 1126)

The answer names its proposal and the revision of the node's own candidate key; a node with no key in a proposal is not asked. The watch for its own placement key is tried again until the seat's state exists, so the node switches when its key is written.
This commit is contained in:
2026-10-28 18:43:49 +01:00
parent 58b4f8b6bc
commit 2fe9d678fc
8 changed files with 125 additions and 117 deletions
+1 -1
View File
@@ -1003,7 +1003,7 @@ func Placed(ctx context.Context, get func(ctx context.Context, bucket, key strin
for try := 1; ; try++ {
raw, err := get(ctx, delivery.PlacementBucket, key)
if errors.Is(err, nats.ErrBucketNotFound) {
return false, nil // the indexer made no placement state yet: nothing places it, read and known
return false, nil // the seat has written no placement state yet: nothing places it, read and known
}
if err == nil {
return len(raw) > 0, nil