ask for ownership async
Some checks failed
Build and Publish / BuildAndDeployAmd64 (push) Successful in 27s
Build and Publish / BuildAndDeploy (push) Has been cancelled

This commit is contained in:
matst80
2024-11-13 09:34:44 +01:00
parent 95720ededd
commit 09b9714083

View File

@@ -407,6 +407,7 @@ func (p *SyncedPool) AddRemote(host string) error {
}
func (p *SyncedPool) getGrain(id CartId) (Grain, error) {
var err error
localGrain, ok := p.local.grains[id]
if !ok {
// check if remote grain exists
@@ -418,11 +419,11 @@ func (p *SyncedPool) getGrain(id CartId) (Grain, error) {
return remoteGrain, nil
}
err := p.RequestOwnership(id)
if err != nil {
log.Printf("Error requesting ownership: %v\n", err)
return nil, err
}
go p.RequestOwnership(id)
// if err != nil {
// log.Printf("Error requesting ownership: %v\n", err)
// return nil, err
// }
localGrain, err = p.local.GetGrain(id)
if err != nil {