Complete refactor to new grpc control plane and only http proxy for carts #4
@@ -37,5 +37,5 @@ type Host interface {
|
||||
Close() error
|
||||
Ping() bool
|
||||
IsHealthy() bool
|
||||
AnnounceOwnership(ids []uint64)
|
||||
AnnounceOwnership(ownerHost string, ids []uint64)
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ func (p *SimpleGrainPool[V]) broadcastOwnership(ids []uint64) {
|
||||
}
|
||||
|
||||
p.forAllHosts(func(rh Host) {
|
||||
rh.AnnounceOwnership(ids)
|
||||
rh.AnnounceOwnership(p.hostname, ids)
|
||||
})
|
||||
log.Printf("taking ownership of %d ids", len(ids))
|
||||
// go p.statsUpdate()
|
||||
|
||||
@@ -117,9 +117,9 @@ func (h *RemoteHost) GetActorIds() []uint64 {
|
||||
return reply.GetIds()
|
||||
}
|
||||
|
||||
func (h *RemoteHost) AnnounceOwnership(uids []uint64) {
|
||||
func (h *RemoteHost) AnnounceOwnership(ownerHost string, uids []uint64) {
|
||||
_, err := h.controlClient.AnnounceOwnership(context.Background(), &messages.OwnershipAnnounce{
|
||||
Host: h.host,
|
||||
Host: ownerHost,
|
||||
Ids: uids,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user