diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2017-11-14 17:08:56 +0100 |
---|---|---|
committer | Christian Halstrick <christian.halstrick@sap.com> | 2017-11-22 18:15:11 +0100 |
commit | 10e65cb4faf943d4a2a782ceef6f0f09934b150b (patch) | |
tree | d3bb1a9c34bd017ae043b923b4a72ce476dc580d /org.eclipse.jgit/.settings | |
parent | 218cf3403de512f564aa74f18de56c97dd7852b4 (diff) | |
download | jgit-10e65cb4faf943d4a2a782ceef6f0f09934b150b.tar.gz jgit-10e65cb4faf943d4a2a782ceef6f0f09934b150b.zip |
Fix LockFile semantics when running on NFS
When running on NFS there was a chance that JGits LockFile
semantic is broken because File#createNewFile() may allow
multiple clients to create the same file in parallel. This
change provides a fix which is only used when the new config
option core.supportsAtomicCreateNewFile is set to false. The
default for this option is true. This option can only be set in the
global or the system config file. The repository config file is not
taken into account in this case.
If the config option core.supportsAtomicCreateNewFile is true
then File#createNewFile() is trusted and the behaviour doesn't
change.
But if core.supportsAtomicCreateNewFile is set to false then after
successful creation of the lock file a hardlink to that lock file is
created and the attribute nlink of the lock file is checked to be 2. If
multiple clients manage to create the same lock file nlink would be
greater than 2 showing the error.
This expensive workaround is described in
https://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
section III.d) "Exclusive File Creation"
Change-Id: I3d2cc48d8eb280d5f7039eb94da37804f903be6a
Diffstat (limited to 'org.eclipse.jgit/.settings')
-rw-r--r-- | org.eclipse.jgit/.settings/.api_filters | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index 2c27b051b0..3830563495 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <component id="org.eclipse.jgit" version="2"> <resource path="META-INF/MANIFEST.MF"> - <filter comment="non-breaking addition of exception classes needed to cleanly fix error handling in PackFile" id="924844039"> + <filter id="924844039"> <message_arguments> - <message_argument value="4.5.2"/> + <message_argument value="4.5.4"/> <message_argument value="4.5.0"/> </message_arguments> </filter> |