This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 57636 - VcsFileSystem.lock() does not throw UserQuestionExceptions reliably.
Summary: VcsFileSystem.lock() does not throw UserQuestionExceptions reliably.
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks: 57480
  Show dependency tree
 
Reported: 2005-04-07 18:48 UTC by Martin Entlicher
Modified: 2006-03-24 13:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A deadlock that occurs when I replace Turbo.getCachedMeta() with Turbo.getMeta(). (22.27 KB, text/plain)
2005-04-08 12:10 UTC, Martin Entlicher
Details
The textual patch that fixes this issue. (2.72 KB, patch)
2005-04-08 14:19 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2005-04-07 18:48:03 UTC
This is caused by the cache reimplementation. It caused a change in the
functionality, because Turbo.getCachedMeta(fo) does not consult the disk cache,
unlike the old code.

We might want to put there Turbo.getMeta(fo), but it must be carefully tested
when the refresh is invoked to get the status.
Comment 1 Martin Entlicher 2005-04-08 12:10:08 UTC
Created attachment 21494 [details]
A deadlock that occurs when I replace Turbo.getCachedMeta() with Turbo.getMeta().
Comment 2 Martin Entlicher 2005-04-08 12:11:06 UTC
The problem with this is, that it's too dangerous (see the attached thread dump).
Comment 3 Martin Entlicher 2005-04-08 12:50:27 UTC
The problem is, that the requests are comming in AWT thread (isn't this wrong??)
and Turbo.getCachedMeta() takes the properties from the memory layer only when
called from AWT. It does not consult the disk.

The best behavior IMHO would be to check the disk layer and when fprops == null,
consider the file as not local.
Comment 4 Martin Entlicher 2005-04-08 13:52:36 UTC
Fixed in trunk as proposed:

/cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java,v  <-- 
VcsFileSystem.java
new revision: 1.325; previous revision: 1.324
Comment 5 Martin Entlicher 2005-04-08 14:19:15 UTC
Created attachment 21496 [details]
The textual patch that fixes this issue.
Comment 6 _ pkuzel 2005-04-11 11:10:28 UTC
It was strange that FS code called from AWT did not acccess cache disk level.
It's FS anyway so AWT client must count with delays.

REVIEWED
Comment 7 Martin Entlicher 2005-04-11 13:17:39 UTC
Turbo.getCachedMeta() has a condition on AWT thread. That's why.
Anyway, thanks for the review, the fix is now merged into release41 branch:

/cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java,v  <-- 
VcsFileSystem.java
new revision: 1.324.2.1; previous revision: 1.324
Comment 8 Peter Pis 2005-07-13 13:44:57 UTC
Verified.