Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Affects Version/s: QUADS_QUERY_BRANCH
-
Fix Version/s: None
-
Component/s: Journal
-
Labels:
Description
com.bigdata.journal.TestDoubleOpen is having a side effect which causes some subsequent tests in TestCompactJournal to fail when they would otherwise succeed.
// test behavior when journal is opened by two threads. suite.addTestSuite(TestDoubleOpen.class); // test compacting merge of a Journal. suite.addTestSuite(TestCompactJournal.class);
Sample errors produced for those test failures are:
Test did not close journal(s): nopen=2, nclose=1, ndestroy=1, test=class com.bigdata.journal.TestDoubleOpen.test_doubleOpen, testClass=com.bigdata.journal.TestWORMStrategy junit.framework.AssertionFailedError: Test did not close journal(s): nopen=2, nclose=1, ndestroy=1, test=class com.bigdata.journal.TestDoubleOpen.test_doubleOpen, testClass=com.bigdata.journal.TestWORMStrategy at com.bigdata.journal.TestHelper.checkJournalsClosed(TestHelper.java:82) at com.bigdata.journal.AbstractJournalTestCase.tearDown(AbstractJournalTestCase.java:88) at com.bigdata.journal.ProxyTestCase.tearDown(ProxyTestCase.java:151)
which then leads into a "false" error in TestCompactJournal
Test did not release buffer(s): nacquired=18, nreleased=12, test=class com.bigdata.journal.TestCompactJournal.test_emptyJournal, testClass=com.bigdata.journal.TestWORMStrategy junit.framework.AssertionFailedError: Test did not release buffer(s): nacquired=18, nreleased=12, test=class com.bigdata.journal.TestCompactJournal.test_emptyJournal, testClass=com.bigdata.journal.TestWORMStrategy at com.bigdata.io.DirectBufferPoolTestHelper.checkBufferPools(DirectBufferPoolTestHelper.java:81) at com.bigdata.journal.TestHelper.checkJournalsClosed(TestHelper.java:113) at com.bigdata.journal.AbstractJournalTestCase.tearDown(AbstractJournalTestCase.java:88) at com.bigdata.journal.ProxyTestCase.tearDown(ProxyTestCase.java:151)
The presumed mechanism for the false error is the lazy close via a finalizer of the second view onto the same backing journal file in TestDoubleOpen. That close can occur during a follow on test, causing that test to report an unbalanced journal open/close.