Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327192

Summary: Concurrent access to file while decorating
Product: [Eclipse Project] Platform Reporter: Szymon Ptaszkiewicz <sptaszkiewicz>
Component: UIAssignee: Oleg Besedin <ob1.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ob1.eclipse, patrick.lasota, remy.suen, Szymon.Brandys, tomasz.zarna
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 329333, 329334, 329335    
Attachments:
Description Flags
Stack for importing thread
none
Stack for decorating thread
none
Patch v.0.1 ob1.eclipse: iplog+

Description Szymon Ptaszkiewicz CLA 2010-10-07 04:52:23 EDT
The issue came out while working on bug 301223. The problem is that during project set import decorating thread and importing thread are both trying to use the same file. Decorating thread is calling file.getContentDescription() and importing thread is trying to delete this file to make space for incoming file from repository. The file is open because of decorator so delete operation is not successful which results in error during import. Delete operation uses scheduling rule but decorator is not. There should be added simple scheduling rule to decorate operation to prevent concurrent access and error during import.
Comment 1 Szymon Ptaszkiewicz CLA 2010-10-07 04:53:41 EDT
Created attachment 180399 [details]
Stack for importing thread
Comment 2 Szymon Ptaszkiewicz CLA 2010-10-07 04:54:11 EDT
Created attachment 180400 [details]
Stack for decorating thread
Comment 3 Szymon Ptaszkiewicz CLA 2010-10-07 04:57:24 EDT
Created attachment 180401 [details]
Patch v.0.1
Comment 4 Oleg Besedin CLA 2010-10-13 11:04:41 EDT
The patch looks good; applied to CVS Head. 

Szymon, thank you for taking time to figure out the problem and prepare the patch!
Comment 5 Oleg Besedin CLA 2010-10-27 15:11:09 EDT
Verified that the code changes appear in the build I20101026-2000.
Comment 6 Szymon Ptaszkiewicz CLA 2010-11-03 08:31:37 EDT
*** Bug 301223 has been marked as a duplicate of this bug. ***