Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 225082 Details for
Bug 397217
race condition affecting org.eclipse.jgit.storage.file.ObjectDirectoryInserter.insert(...) when called concurrently from multiple threads
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
[PATCH] call FileUtils.mkdir(dst.getParentFile(), true); i.e. with skipExisting=true. instead of FileUtils.mkdir(dst.getParentFile());
0001-call-FileUtils.mkdir-dst.getParentFile-true.patch (text/plain), 1.49 KB, created by
Quentin Burley
on 2012-12-28 07:02:13 EST
(
hide
)
Description:
[PATCH] call FileUtils.mkdir(dst.getParentFile(), true); i.e. with skipExisting=true. instead of FileUtils.mkdir(dst.getParentFile());
Filename:
MIME Type:
Creator:
Quentin Burley
Created:
2012-12-28 07:02:13 EST
Size:
1.49 KB
patch
obsolete
>From 4327b7f10530f2800b0ba0dfab20b0f03d81863a Mon Sep 17 00:00:00 2001 >From: quentinburley <quentinburley@gmail.com> >Date: Fri, 28 Dec 2012 12:59:14 +0100 >Subject: [PATCH] call FileUtils.mkdir(dst.getParentFile(), true); > >i.e. with skipExisting=true. > >instead of FileUtils.mkdir(dst.getParentFile()); > >In order to resolve a race condition that occurs when different threads attempt to create the same directory concurrently. >Such a can condition occur when invoking org.eclipse.jgit.storage.file.ObjectDirectoryInserter.insert(...) concurrently from multiple threads. > >fix for issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=397217 >--- > org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java >index a20f10a..ca64622 100644 >--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java >+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java >@@ -587,7 +587,7 @@ InsertLooseObjectResult insertUnpackedObject(File tmp, ObjectId id, > // directories are always lazily created. Note that we > // try the rename first as the directory likely does exist. > // >- FileUtils.mkdir(dst.getParentFile()); >+ FileUtils.mkdir(dst.getParentFile(), true); > if (tmp.renameTo(dst)) { > dst.setReadOnly(); > unpackedObjectCache.add(id); >-- >1.8.0.msysgit.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 397217
: 225082