mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
8b4c984b28
Summary: This updates the TreeInode::rename() code to handle concurrency better. In particular: - The code now ensures that both the source inode being renamed and destination inode (if it exists) are loaded. This simplifies issues when an inode is being loaded at the same time a rename is in progress. This ensures that any pending load is processed before the rename takes place. (All promises for the load might not be fulfilled before the rename completes, but the relevant TreeInode and InodeMap data structures are updated before the rename occurs.) This does mean that the rename code potentially might have to retry several times if the inode it began loading is no longer the affected source or destination or child once the load completes. However, this seems like a reasonable trade-off, compared to dealing with the complications that would arise with the load code having to handle renames occuring before load completion. - The code now implements proper lock ordering, to avoid acquiring locks in conflicting orders that might cause deadlock with other threads also trying to acquire the same locks. The InodeLocks.md document has been updated to clarify the TreeInode lock ordering requirements. Reviewed By: wez Differential Revision: D4493526 fbshipit-source-id: 627393fafad90eb551aea62be7762d59ed043abe |
||
---|---|---|
.. | ||
test | ||
Dirstate.cpp | ||
Dirstate.h | ||
DirstatePersistence.cpp | ||
DirstatePersistence.h | ||
EdenDispatcher.cpp | ||
EdenDispatcher.h | ||
EdenMount.cpp | ||
EdenMount.h | ||
EdenMounts.cpp | ||
EdenMounts.h | ||
FileData.cpp | ||
FileData.h | ||
FileHandle.cpp | ||
FileHandle.h | ||
FileInode.cpp | ||
FileInode.h | ||
InodeBase.cpp | ||
InodeBase.h | ||
InodeError.cpp | ||
InodeError.h | ||
InodeMap.cpp | ||
InodeMap.h | ||
InodePtr-defs.h | ||
InodePtr.cpp | ||
InodePtr.h | ||
InodePtrFwd.h | ||
Overlay.cpp | ||
Overlay.h | ||
overlay.thrift | ||
ParentInodeInfo.h | ||
TARGETS | ||
TreeInode.cpp | ||
TreeInode.h | ||
TreeInodeDirHandle.cpp | ||
TreeInodeDirHandle.h |