Complete refactor to new grpc control plane and only http proxy for carts #4

Merged
mats merged 75 commits from refactor/http-proxy into main 2025-10-14 22:31:28 +02:00
Showing only changes of commit 2bf0475335 - Show all commits

View File

@@ -370,9 +370,13 @@ func (p *SimpleGrainPool[V]) Apply(id uint64, mutation proto.Message) (*V, error
if applyErr := p.mutationRegistry.Apply(grain, mutation); applyErr != nil { if applyErr := p.mutationRegistry.Apply(grain, mutation); applyErr != nil {
return nil, applyErr return nil, applyErr
} }
if p.storage != nil {
go func() {
if err := p.storage.AppendEvent(id, mutation); err != nil { if err := p.storage.AppendEvent(id, mutation); err != nil {
log.Printf("failed to store mutation for grain %d: %v", id, err) log.Printf("failed to store mutation for grain %d: %v", id, err)
} }
}()
}
return grain.GetCurrentState() return grain.GetCurrentState()
} }