log ownership change
This commit is contained in:
@@ -115,7 +115,7 @@ func (p *SimpleGrainPool[V]) HandleRemoteExpiry(host string, ids []uint64) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *SimpleGrainPool[V]) HandleOwnershipChange(host string, ids []uint64) error {
|
func (p *SimpleGrainPool[V]) HandleOwnershipChange(host string, ids []uint64) error {
|
||||||
|
log.Printf("host %s now owns %d cart ids", host, len(ids))
|
||||||
p.remoteMu.RLock()
|
p.remoteMu.RLock()
|
||||||
remoteHost, exists := p.remoteHosts[host]
|
remoteHost, exists := p.remoteHosts[host]
|
||||||
p.remoteMu.RUnlock()
|
p.remoteMu.RUnlock()
|
||||||
@@ -344,7 +344,7 @@ func (p *SimpleGrainPool[V]) broadcastOwnership(ids []uint64) {
|
|||||||
p.forAllHosts(func(rh Host) {
|
p.forAllHosts(func(rh Host) {
|
||||||
rh.AnnounceOwnership(p.hostname, ids)
|
rh.AnnounceOwnership(p.hostname, ids)
|
||||||
})
|
})
|
||||||
log.Printf("taking ownership of %d ids", len(ids))
|
log.Printf("%s taking ownership of %d ids", p.hostname, len(ids))
|
||||||
// go p.statsUpdate()
|
// go p.statsUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user