db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3655) errror in nightly regression test: LobStreamsTest:encryptedjunit.framework.AssertionFailedError: f:\jartest\JarResults.2008-04-29\ibm16_suites.All\system\singleUse\oneuse1e\tmp\lob6165.tmp
Date Fri, 26 Sep 2008 17:25:44 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634938#action_12634938
] 

Kathey Marsden commented on DERBY-3655:
---------------------------------------

Here is the comment from the checkin that introduced the WeakHashMap
 	 DERBY-3354: Select from large lob table with embedded gives OutOfMemoryError
Contributed by Anurag.

This patch introduces a new WeakHashMap in EmbedConnection. EmbedBlob and EmbedClob objects
references are stored in this
map (objects as key and null as value). Adding entry to locater map is
differed till the first call of getLocater.
This ensures that there is entry of LOB objects in locater map if they are invoked in embedded
mode.
As the keys of WeakHashMap doesn't prevents the objects from being
garbage collected, once the lob objects are unreferenced lob objects will
be garbage collected releasing the memory.

During commit/rollback or Connection.close, free is invoked on all the lob
objects from WeakHashMap and the map is cleared.


So, I guess the reason for the WeakHashMap is so that blobs that are no longer referenced
can be garbage collected before the transaction ends.  Perhaps the correct solution is to
force a gc and finalization after clearLobMapping does its work.




> errror in nightly regression test: LobStreamsTest:encryptedjunit.framework.AssertionFailedError:
f:\jartest\JarResults.2008-04-29\ibm16_suites.All\system\singleUse\oneuse1e\tmp\lob6165.tmp
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3655
>                 URL: https://issues.apache.org/jira/browse/DERBY-3655
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.3.0, 10.4.2.0
>         Environment: OS: Windows, Test: v10_4 branch insane jars, ibm16 jvm
> OS: Windows, Test: v10_3 branch insane jars, ibm142 jvm
>            Reporter: Mike Matrigali
>
> There was 1 failure:
> 1) LobStreamsTest:encryptedjunit.framework.AssertionFailedError: f:\jartest\JarResults.2008-04-29\ibm16_suites.All\system\singleUse\oneuse1e\tmp\lob6165.tmp
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:130)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:128)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:35)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:105)
> 	at java.security.AccessController.doPrivileged(AccessController.java:202)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:102)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:98)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDatabase(DropDatabaseSetup.java:91)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.tearDown(DropDatabaseSetup.java:77)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message