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.
Summary: | Locked by DB IO Exception | ||
---|---|---|---|
Product: | db | Reporter: | pragalathan <pragalathan> |
Component: | SQL Editor | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | KhArtNJava |
Priority: | P3 | Keywords: | NETFIX |
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 186000 |
Attachments: |
stacktrace
proposed patch v1 stacktrace |
Description
pragalathan
2012-03-19 08:47:50 UTC
Created attachment 116851 [details]
stacktrace
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=186000 Created attachment 120934 [details]
proposed patch v1
The attached patch moves saving into a seperate task that is invoked with a delay of 5 seconds. As save is called anytime an sql is executed, this should save some performance.
The task implicitly serializes saving and so locking problems should be minimized.
To prevent data loss on jvm shutdown a shutdown hook is added, that checks whether there are unsave changes and flushes these out.
Created attachment 121356 [details]
stacktrace
Clicked on View Data in the DB table context menu.
Thank you very much. Great job, Matthias. I've only slightly modified the test case, because Thread.sleep can cause problems when the tests are run on a Hudson builder. Integrated as http://hg.netbeans.org/core-main/rev/13832fcf1769 Integrated into 'main-golden', will be available in build *201209250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/13832fcf1769 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #209720: Locked by DB IO Exception |