more logs
This commit is contained in:
@@ -105,7 +105,7 @@ func (p *SyncedPool) GrainOwnerChangeHandler(data []byte) (PoolMessage, []byte,
|
||||
}
|
||||
id := ToCartId(idAndHostParts[0])
|
||||
host := idAndHostParts[1]
|
||||
|
||||
log.Println("Handling grain owner change to %s for id %s\n", host, id)
|
||||
for _, r := range p.remotes {
|
||||
if r.Host == host {
|
||||
// log.Printf("Remote grain %s changed to %s\n", id, host)
|
||||
@@ -115,7 +115,6 @@ func (p *SyncedPool) GrainOwnerChangeHandler(data []byte) (PoolMessage, []byte,
|
||||
return AckChange, []byte("ok"), nil
|
||||
}
|
||||
}
|
||||
|
||||
go p.AddRemote(host)
|
||||
return AckChange, []byte("ok"), nil
|
||||
}
|
||||
@@ -128,7 +127,7 @@ func (p *SyncedPool) RemoveRemoteGrain(id CartId) {
|
||||
|
||||
func (p *SyncedPool) SpawnRemoteGrain(id CartId, host string) {
|
||||
if p.local.grains[id] != nil {
|
||||
log.Printf("Grain %s already exists locally, exists on (%s)\n", id, host)
|
||||
log.Printf("Grain %s already exists locally, owner is (%s)\n", id, host)
|
||||
p.mu.Lock()
|
||||
delete(p.local.grains, id)
|
||||
p.mu.Unlock()
|
||||
@@ -321,7 +320,7 @@ func (p *SyncedPool) RequestOwnership(id CartId) error {
|
||||
ok := 0
|
||||
all := 0
|
||||
for _, r := range p.remotes {
|
||||
// log.Printf("Confirming change of %s to %s (me) with %s\n", id, p.Hostname, r.Host)
|
||||
log.Printf("Asking for confirmation change of %s to %s (me) with %s\n", id, p.Hostname, r.Host)
|
||||
err := r.ConfirmChange(id, p.Hostname)
|
||||
all++
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user