moana
moana copied to clipboard
Lock framework
While handling requests cluster wide, two or more parallel requests may corrupt or cause undefined behaviour without locks.
Implement Cluster wide lock framework using fcntl
and local lock framework(To handle parallel requests in single Manager instance).
Current implementation is without locks with TODOs where lock is necessary.
Ref:
- https://crystal-lang.org/api/1.1.1/IO/FileDescriptor.html#flock_exclusive(blocking=true,&)-instance-method
- https://crystal-lang.org/api/1.1.1/Mutex.html