Repository navigation
Allow sub-locking with acquired exclusive lock - #17164
nickvergessen wants to merge 4 commits into
Conversation
|
A new inspection was created. |
|
Will create a full smashbox overview over lunch |
|
👎 I don't think this is the correct way to solve the problem, having the lock actually lock the file even for the current process prevents getting unexpected results when trying to do fs work in the middle of an existing fs operation, having a storage wrapper call A write lock is not just to keep other processes from reading the file, it should also prevent the same process from reading the file since we can't guarantee correct behavior when reading a file that's being written to. In the past we've had to fix multiple bugs that we're caused by wrappers/hooks/etc interfering with filesystem operations. Locking should make filesystem operations atomic and prevent unexpected behavior, something we cant do if the same process can simply ignore the lock. |
|
@nickvergessen can you run the loop=10 case you had before on this branch ? |
|
Done with locking for today => monday |
We need a way so that subcalls of the same process can try to get locks.
This is required because storage wrappers and hooks are within the parent lock,
but currently fail to be allowed to get locks, because the file is already locked.
So I added local lock tracking, if we have an exclusive lock already. The memcache lock
can only be released when we have no more local locks. This allows subsequent calls of the
same process to lock and release files just normally.
This thereby fixes the problem of the encryption storage wrapper that makes smashbox fail, see #17029 for more details.
Fixes #17029
@PVince81 @icewind1991 @DeepDiver1975 @schiesbn