update
Build and Publish / BuildAndDeployArm64 (push) Failing after 6s
Build and Publish / BuildAndDeployAmd64 (push) Failing after 4s

This commit is contained in:
2026-07-03 17:45:51 +02:00
parent f339b60351
commit cecf4abe76
12 changed files with 1818 additions and 112 deletions
+16 -6
View File
@@ -263,10 +263,16 @@ func (h *RemoteHost[V]) GetActorIds() []uint64 {
return reply.GetIds()
}
func (h *RemoteHost[V]) AnnounceOwnership(ownerHost string, uids []uint64) {
func (h *RemoteHost[V]) AnnounceOwnership(ownerHost string, uids []uint64, lastChanges []int64) {
// lastChanges is parallel to uids and carries each grain's
// UnixNano lastChange stamp at the moment of broadcast. Receivers
// use it for first-spawn-wins arbitration on concurrent cold
// cache first touch; -1 entries signal "no local grain to back
// this id" and trigger the legacy "always accept remote" fallback.
_, err := h.controlClient.AnnounceOwnership(context.Background(), &messages.OwnershipAnnounce{
Host: ownerHost,
Ids: uids,
Host: ownerHost,
Ids: uids,
LastChanges: lastChanges,
})
if err != nil {
log.Printf("ownership announce to %s failed: %v", h.host, err)
@@ -276,10 +282,14 @@ func (h *RemoteHost[V]) AnnounceOwnership(ownerHost string, uids []uint64) {
h.missedPings = 0
}
func (h *RemoteHost[V]) AnnounceExpiry(uids []uint64) {
func (h *RemoteHost[V]) AnnounceExpiry(uids []uint64, lastChanges []int64) {
// lastChanges is a parallel UnixNano stamp slice; informational on
// this path (expiry is unilateral from the broadcaster), kept on
// the wire for symmetry with AnnounceOwnership.
_, err := h.controlClient.AnnounceExpiry(context.Background(), &messages.ExpiryAnnounce{
Host: h.host,
Ids: uids,
Host: h.host,
Ids: uids,
LastChanges: lastChanges,
})
if err != nil {
log.Printf("expiry announce to %s failed: %v", h.host, err)