From: <tho...@us...> - 2011-05-20 19:02:38
|
Revision: 4537 http://bigdata.svn.sourceforge.net/bigdata/?rev=4537&view=rev Author: thompsonbry Date: 2011-05-20 19:02:32 +0000 (Fri, 20 May 2011) Log Message: ----------- Hopefully a fix for [1]. I have removed the hard reference in WriteExecutorService.MyLockManager and enabled TestJournalShutdown and TestQueryEngineFactory. I've run through the transient and worm journal test suites and TestLocalTripleStore, and TestBigdataSailWithQuads. All seems good, so I have committed this to see the impact in CI. [1] https://sourceforge.net/apps/trac/bigdata/ticket/196 (Journal leaks memory) Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/journal/WriteExecutorService.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestQueryEngineFactory.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestJournalShutdown.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestTransientJournal.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/journal/WriteExecutorService.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/journal/WriteExecutorService.java 2011-05-20 18:57:12 UTC (rev 4536) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/journal/WriteExecutorService.java 2011-05-20 19:02:32 UTC (rev 4537) @@ -221,12 +221,12 @@ private static class MyLockManager<R extends Comparable<R>> extends NonBlockingLockManagerWithNewDesign<R> { - /* - * FIXME restored hard reference since introducing just a weak reference - * here appears to be causing some odd behaviors. Track these behaviors - * down and sort this all out. - */ - private final WriteExecutorService service; +// /* +// * FIXME restored hard reference since introducing just a weak reference +// * here appears to be causing some odd behaviors. Track these behaviors +// * down and sort this all out. +// */ +// private final WriteExecutorService service; private final WeakReference<WriteExecutorService> serviceRef; public MyLockManager(final int capacity, final int maxLockTries, @@ -235,7 +235,7 @@ super(capacity, maxLockTries, predeclareLocks); - this.service = service; +// this.service = service; this.serviceRef = new WeakReference<WriteExecutorService>(service); } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestQueryEngineFactory.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestQueryEngineFactory.java 2011-05-20 18:57:12 UTC (rev 4536) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestQueryEngineFactory.java 2011-05-20 19:02:32 UTC (rev 4537) @@ -100,15 +100,9 @@ */ public void test_memoryLeak() throws InterruptedException { - if (true) { - /* - * FIXME Disabled for now since causing CI to fail. - */ - log.error("Enable test."); +// // This test currently fails.... +// fail("See https://sourceforge.net/apps/trac/bigdata/ticket/196."); - return; - } - final int limit = 200; final Properties properties = new Properties(); @@ -144,9 +138,9 @@ } catch (OutOfMemoryError err) { - System.err.println("Out of memory after creating " + ncreated + log.error("Out of memory after creating " + ncreated + " query controllers."); - + } // Demand a GC. @@ -155,12 +149,14 @@ // Wait for it. Thread.sleep(1000/*ms*/); - System.err.println("Created " + ncreated + " query controllers."); + if(log.isInfoEnabled()) + log.info("Created " + ncreated + " query controllers."); final int nalive = QueryEngineFactory.getQueryControllerCount(); - System.err.println("There are " + nalive - + " query controllers which are still alive."); + if (log.isInfoEnabled()) + log.info("There are " + nalive + + " query controllers which are still alive."); if (nalive == ncreated) { Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestJournalShutdown.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestJournalShutdown.java 2011-05-20 18:57:12 UTC (rev 4536) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestJournalShutdown.java 2011-05-20 19:02:32 UTC (rev 4537) @@ -84,8 +84,8 @@ public void test_memoryLeakWithoutExplicitClose() throws InterruptedException { - // This test currently fails.... - fail("See https://sourceforge.net/apps/trac/bigdata/ticket/196."); +// // This test currently fails.... +// fail("See https://sourceforge.net/apps/trac/bigdata/ticket/196."); doMemoryLeakTest(false); Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestTransientJournal.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestTransientJournal.java 2011-05-20 18:57:12 UTC (rev 4536) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/journal/TestTransientJournal.java 2011-05-20 19:02:32 UTC (rev 4537) @@ -122,9 +122,11 @@ final Properties properties = getProperties(); - Journal journal = new Journal(properties); + final Journal journal = new Journal(properties); - TransientBufferStrategy bufferStrategy = (TransientBufferStrategy) journal.getBufferStrategy(); + try { + + final TransientBufferStrategy bufferStrategy = (TransientBufferStrategy) journal.getBufferStrategy(); assertFalse("isStable",bufferStrategy.isStable()); assertTrue("isFullyBuffered",bufferStrategy.isFullyBuffered()); @@ -137,6 +139,12 @@ assertEquals("userExtent", bufferStrategy.getExtent(), bufferStrategy .getUserExtent()); + } finally { + + journal.destroy(); + + } + } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |