-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Problem description
Current implementation of store uses filesystem for storage api.Machine objects. We are using mutex for avoid of race condition during modified api.Machine. But we don't have any protection between running multiple instances of libvirt-provider.
It can create race condition during upgrade of libvirt-provider, when multiple instances of libvirt-provider run simultaneously.
I think we need to fix this special case. One of possible solution is use lock base on file (same logic as flock). Maybe: https://pkg.go.dev/github.com/theckman/go-flock
What do you think?