Hi all,

I'm in the midst of tracking down a leak that occurs when I do a write operation on an object graph. Garbage collection isn't removing these objects because they are referred to by internal ojb classes. Presumably some internal cleanup isn't occurring properly after each
begin tx ... commit tx cycle.
No leak seems to occur, however, if I simply do a read operation on the same graph.


A preliminary observation that I have made is that for some reason, when I call lock() on the graph root, eventually that graph root is again retrieved from the db, as shown in the trace below (my two notes indicated by <------- xxxx ***). Thus an unnecessary copy is made of the root object, and this copy may not be gc'd because of the ojb references to it that presumably are not cleaned up.

Does anyone have some insights that might help as I look at this under the microscope? (I using the profiler Optimizeit: couldn't find a decent open-source alternative). Is there some extra cleanup that I should be doing using the ODMG api? Is this known behaviour by any chance, or better, already fixed? I'm running 1.0.rc4 with per-broker caching and implicit locking at the moment.

Thanks,

Phil


Allocated at
ConstructorHelper.instantiate() (ConstructorHelper.java:158) <--root object gets instantatiated again here!!! ***


RowReaderDefaultImpl.buildWithReflection() (RowReaderDefaultImpl.java:233)
RowReaderDefaultImpl.readObjectFrom() (RowReaderDefaultImpl.java:116)
RsIterator.getObjectFromResultSet() (RsIterator.java:433)
RsIterator.next() (RsIterator.java:254)
PersistenceBrokerImpl.getCollectionByQuery() (PersistenceBrokerImpl.java:1374)
PersistenceBrokerImpl.getCollectionByQuery() (PersistenceBrokerImpl.java:1515)
PersistenceBrokerImpl.getCollectionByQuery() (PersistenceBrokerImpl.java:1483)
DelegatingPersistenceBroker.getCollectionByQuery() (DelegatingPersistenceBroker.java:307)
DelegatingPersistenceBroker.getCollectionByQuery() (DelegatingPersistenceBroker.java:307)
CollectionProxy.loadData() (CollectionProxy.java:141)
ListProxy.loadData() (ListProxy.java:187)
CollectionProxy.getData() (CollectionProxy.java:375)
CollectionProxy.iterator() (CollectionProxy.java:199)
CollectionProxy.ojbIterator() (CollectionProxy.java:429)
TransactionImpl.lockCollections() (TransactionImpl.java:914)
TransactionImpl.register() (TransactionImpl.java:809)
TransactionImpl.lock() (TransactionImpl.java:291)
TransactionImpl.lockCollections() (TransactionImpl.java:982)
TransactionImpl.register() (TransactionImpl.java:809)
TransactionImpl.lock() (TransactionImpl.java:291)
TransactionImpl.lockReferences() (TransactionImpl.java:1018)
TransactionImpl.register() (TransactionImpl.java:801)
TransactionImpl.lock() (TransactionImpl.java:291)
DB.lock() (DB.java:205) <---------------lock the root object here ***
EventServer.commitEvent() (EventServer.java:621)
EventServerLocal.commitEvent() (EventServerLocal.java:700)
EventServerLoadTest.testEventReadLoad() (EventServerLoadTest.java:135)
NativeMethodAccessorImpl.invoke() ()
DelegatingMethodAccessorImpl.invoke() ()
TestCase.runTest() (TestCase.java:154)
TestCase.runBare() (TestCase.java:127)
TestResult$1.protect() (TestResult.java:106)
TestResult.runProtected() (TestResult.java:124)
TestResult.run() (TestResult.java:109)
TestCase.run() (TestCase.java:118)
TestSuite.runTest() (TestSuite.java:208)
TestSuite.run() (TestSuite.java:203)
TestRunner.doRun() (TestRunner.java:116)
TestRunner.start() (TestRunner.java:172)
TestRunner.main() (TestRunner.java:138)
EventServerLoadTest.main() (EventServerLoadTest.java:49)
NativeMethodAccessorImpl.invoke() ()
DelegatingMethodAccessorImpl.invoke() ()




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to