Complete refactor to new grpc control plane and only http proxy for carts #4
@@ -370,8 +370,12 @@ func (p *SimpleGrainPool[V]) Apply(id uint64, mutation proto.Message) (*V, error
|
||||
if applyErr := p.mutationRegistry.Apply(grain, mutation); applyErr != nil {
|
||||
return nil, applyErr
|
||||
}
|
||||
if err := p.storage.AppendEvent(id, mutation); err != nil {
|
||||
log.Printf("failed to store mutation for grain %d: %v", id, err)
|
||||
if p.storage != nil {
|
||||
go func() {
|
||||
if err := p.storage.AppendEvent(id, mutation); err != nil {
|
||||
log.Printf("failed to store mutation for grain %d: %v", id, err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
return grain.GetCurrentState()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user