always request ownership
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 2m4s

This commit is contained in:
matst80
2024-11-11 23:53:39 +01:00
parent 95ff0575de
commit 6a90449859

View File

@@ -443,9 +443,9 @@ func (p *SyncedPool) getGrain(id CartId, requestOwnership bool) (Grain, error) {
remoteLookupCount.Inc()
return remoteGrain, nil
}
if requestOwnership {
go p.RequestOwnership(id)
}
localGrain, err = p.local.GetGrain(id)
if err != nil {
return nil, err
@@ -478,10 +478,5 @@ func (p *SyncedPool) Get(id CartId) (*CallResult, error) {
if remoteGrain, ok := grain.(*RemoteGrain); ok {
return remoteGrain.GetCurrentState()
}
if localGrain, ok := grain.(*CartGrain); ok {
if len(localGrain.storageMessages) > 0 {
go p.RequestOwnership(id)
}
}
return grain.GetCurrentState()
}