Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 129980 - Excessive logging of exceptions for unknown files
Excessive logging of exceptions for unknown files
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
All All
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
: PERFORMANCE
: 128402 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-13 00:49 UTC by _ tboudreau
Modified: 2008-03-20 09:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
proposed patch (1.55 KB, patch)
2008-03-18 13:57 UTC, Padraig Obriain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2008-03-13 00:49:39 UTC
I have a bunch of local changes to contrib/hexeditor which Mercurial does not yet know about.  My log is filled with stack traces such as the ones below.

Given that this problem will occur any time there is a new file that Mercurial does not know about, it really does not make sense to log a stack trace for 
each one.  Those of us working on our own modules with their own logging find it a lot of noise to dig through.

Also, I would suggest not using exceptions as the mechanism for reporting this situation - creating exceptions is expensive and has an impact on 
performance.  Since this is a perfectly normal situation, and in a normal session with a bunch of new files, thousands of such exceptions can easily be 
thrown, it is very likely to hurt performance.

java.io.IOException: Unable to get BASE revision of /Users/tim/nbsrc/contrib/hexeditor/nbproject/project.xml
[catch] at org.netbeans.modules.mercurial.Mercurial.getOriginalFile(Mercurial.java:323)
	at org.netbeans.modules.mercurial.MercurialVCS.getOriginalFile(MercurialVCS.java:109)
	at org.netbeans.modules.versioning.diff.DiffSidebar.getText(DiffSidebar.java:753)
	at org.netbeans.modules.versioning.diff.DiffSidebar.access$900(DiffSidebar.java:88)
	at org.netbeans.modules.versioning.diff.DiffSidebar$RefreshDiffTask.fetchOriginalContent(DiffSidebar.java:704)
	at org.netbeans.modules.versioning.diff.DiffSidebar$RefreshDiffTask.computeDiff(DiffSidebar.java:677)
	at org.netbeans.modules.versioning.diff.DiffSidebar$RefreshDiffTask.run(DiffSidebar.java:667)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 Padraig Obriain 2008-03-13 09:09:08 UTC
We are doing essestially the same as the Subversion module here.

Transferring to versioning for further evaluation.
Comment 2 Maros Sandor 2008-03-17 14:12:08 UTC
You have to evaluate the error state in MercurialVCS.getOriginalFile() and only log exceptions that really signal some
exceptional situation. The fact that you won't get a BASE version of a NEW file is certainly not exceptional and you
should not log any error in such case. DiffSidebar does not know about status of your files. I think that check for
STATUS_DIFFABLE fails in Hg for some reason.
Comment 3 Padraig Obriain 2008-03-18 12:22:33 UTC
That the check for STATUS_DIFFABLE fails would explain why we would get an exception.

However, I have not been able to reproduce this problem this morning. When I create a new file its status in
getOriginalFile is LocallyNew and the exception does not occur.

Do you have a reproducible test case for this?
Comment 4 Padraig Obriain 2008-03-18 12:41:42 UTC
I have just seen the problem happen.
Comment 5 Padraig Obriain 2008-03-18 13:57:15 UTC
Created attachment 58577 [details]
proposed patch
Comment 6 Padraig Obriain 2008-03-18 14:08:28 UTC
Patch committed in changeset 73978:cb2d91802f02.
Comment 7 Padraig Obriain 2008-03-20 09:58:26 UTC
*** Issue 128402 has been marked as a duplicate of this issue. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo