The original omnibase relied locking completely on filesystem locking. In the windows systems back then locking was always mandatory, meaning the full file was locked. Early users of omnibase fiddled with the mandatory locking option in linux systems.
The semantics of fcntl() in *nix systems is that it is capable of locking resources between processes. This means two processes locking the same resource will fail. But the semantics are as well that within a process you cannot have that lock because it is expected that the process knows better how to organize concurrency.
This PR is an attempt to move locks from within a transaction to a global image structure. This can then be checked and locking conflicts can be detected before going to disk. This will then also work if multiple omnibase instances trying to lock the same object. The management is per filesystem path because locking refers to all objects below the root directory of a single omnibase
The original omnibase relied locking completely on filesystem locking. In the windows systems back then locking was always mandatory, meaning the full file was locked. Early users of omnibase fiddled with the mandatory locking option in linux systems. The semantics of fcntl() in *nix systems is that it is capable of locking resources between processes. This means two processes locking the same resource will fail. But the semantics are as well that within a process you cannot have that lock because it is expected that the process knows better how to organize concurrency. This PR is an attempt to move locks from within a transaction to a global image structure. This can then be checked and locking conflicts can be detected before going to disk. This will then also work if multiple omnibase instances trying to lock the same object. The management is per filesystem path because locking refers to all objects below the root directory of a single omnibase