| Summary: | Memory leak when sampling data | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Data Tools | Reporter: | Balaji Kadambi <bkadambi> | ||||||
| Component: | SQLDevTools | Assignee: | Brian Payton <bpayton> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | bkadambi, bpayton, proberts | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 1.9.2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Balaji Kadambi
So far as I can recall, much of the SQL functionality really wasn't meant for huge data sets. But even more interesting, I don't recall there being a "Return All Rows" menu anywhere. Are you sure this is DTP or an IBM product? Hi Fitz, you are correct, this is an IBM extension. I'll follow up with the Balaji. Brian, The out of memory exception occurred in an IBM product built over the DTP code. But the reason for memory leak was in DTP code. I will be attaching a patch shortly. Please let me know if I need to modify the description. Thanks, Balaji (In reply to comment #1) > So far as I can recall, much of the SQL functionality really wasn't meant for > huge data sets. But even more interesting, I don't recall there being a "Return > All Rows" menu anywhere. Are you sure this is DTP or an IBM product? Created attachment 192357 [details]
Patch for the bug
There was strong reference to the result objects after the remove all finished action in ResultSetViewerRegistryProvider. The viewer providers held a reference to the resuilt objects that has been removed.
There is a weak reference to the ResultSetObject in the jdk ObjectStreamClass. To minimize memory usage after the remove all finished action, the results in the ResultSetObject has been cleared.
Created attachment 193784 [details] Patch for bug 341329. Brian, Do you have an update as to when this fix will be done? This fix is important as it fixes a memory leak. Thanks, Balaji Hi Balaji, Is it guaranteed that a ResultSetViewerDescriptor has a ExternalResultSetViewerProvider? That is, do we need a null check here in removeViewerProviderConstants? ResultSetViewerDescriptor desc = (ResultSetViewerDescriptor) viewerList.get(i); ExternalResultSetViewerProvider provider = desc.getViewerProvider(); provider.setResult(null); provider.setResultInstance(null); In the scenario that I saw the ResultSetViewerDescriptor always has a ExternalResultSetViewerPovider when removeViewerProviderConstants is called from RemoveAllVisibleFinishedResultAction class. It would be safe to add a null check here even otherwise. Do you need another patch from me with the null check. Please let me know. Thanks, Balaji (In reply to comment #7) > Hi Balaji, > Is it guaranteed that a ResultSetViewerDescriptor has a > ExternalResultSetViewerProvider? That is, do we need a null check here in > removeViewerProviderConstants? > ResultSetViewerDescriptor desc = (ResultSetViewerDescriptor) > viewerList.get(i); > ExternalResultSetViewerProvider provider = desc.getViewerProvider(); > provider.setResult(null); > provider.setResultInstance(null); No, I can make the change. Here's the Git commit link for the original patch: http://git.eclipse.org/c/datatools/org.eclipse.datatools.sqltools.git/commit/?id=3e43d03e7d10d3f87e0003939759b86ff4489ee5 And the commit link for the addition of the null check: http://git.eclipse.org/c/datatools/org.eclipse.datatools.sqltools.git/commit/?id=62390f577d82096b8d03a1971253f937c67b30f9 Thanks Brian. Which version of DTP will actually have this fix? Regards, Balaji (In reply to comment #10) > Here's the Git commit link for the original patch: > http://git.eclipse.org/c/datatools/org.eclipse.datatools.sqltools.git/commit/?id=3e43d03e7d10d3f87e0003939759b86ff4489ee5 > And the commit link for the addition of the null check: > http://git.eclipse.org/c/datatools/org.eclipse.datatools.sqltools.git/commit/?id=62390f577d82096b8d03a1971253f937c67b30f9 It is included in the next maintenance release of DTP, v1.9.2, which goes GA on Feb 21, 2012. |