public abstract class TestConcurrentKBCreate extends ProxyBigdataSailTestCase
Note: There is a data race when creating the a KB (especially the default KB) and verifying that the KB exists. If we find the KB in the row store cache but we do not find the axioms, then the subsequent attempts to resolve the KB fail - probably due to an issue with the default resource locator cache. This is observed in the HA test suite where we wait for a quorum meet and then spin in a loop looking for the KB to be concurrently created by the NSS. This test suite was written to replicate and diagnose this problem. A representative stack trace is below. Once this trace is generated, it is produced repeatedly. Presumably, a restart of the service would cure the stack trace since it is a cache side effect.
INFO : 41211 2012-11-06 08:38:41,874 : WARN : 8542 2012-11-06 08:38:41,873 qtp877533177-45 org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:50): /sparql INFO : 41211 2012-11-06 08:38:41,874 : java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: No axioms defined? : LocalTripleStore{timestamp=-1, namespace=kb, container=null, indexManager=com.bigdata.journal.jini.ha.HAJournal@4d092447} INFO : 41211 2012-11-06 08:38:41,874 : at com.bigdata.rdf.sail.webapp.QueryServlet.doEstCard(QueryServlet.java:1120) INFO : 41211 2012-11-06 08:38:41,874 : at com.bigdata.rdf.sail.webapp.QueryServlet.doGet(QueryServlet.java:178) INFO : 41211 2012-11-06 08:38:41,874 : at com.bigdata.rdf.sail.webapp.RESTServlet.doGet(RESTServlet.java:175) INFO : 41211 2012-11-06 08:38:41,874 : at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) INFO : 41211 2012-11-06 08:38:41,874 : at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:929) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) INFO : 41211 2012-11-06 08:38:41,874 : at org.eclipse.jetty.server.Server.handle(Server.java:352) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1051) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) INFO : 41212 2012-11-06 08:38:41,875 : at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451) INFO : 41212 2012-11-06 08:38:41,875 : at java.lang.Thread.run(Thread.java:680) INFO : 41212 2012-11-06 08:38:41,875 : Caused by: java.lang.RuntimeException: java.lang.RuntimeException: No axioms defined? : LocalTripleStore{timestamp=-1, namespace=kb, container=null, indexManager=com.bigdata.journal.jini.ha.HAJournal@4d092447} INFO : 41212 2012-11-06 08:38:41,875 : at com.bigdata.rdf.sail.webapp.QueryServlet.doEstCard(QueryServlet.java:1102) INFO : 41212 2012-11-06 08:38:41,875 : ... 23 more INFO : 41212 2012-11-06 08:38:41,875 : Caused by: java.lang.RuntimeException: No axioms defined? : LocalTripleStore{timestamp=-1, namespace=kb, container=null, indexManager=com.bigdata.journal.jini.ha.HAJournal@4d092447} INFO : 41212 2012-11-06 08:38:41,875 : at com.bigdata.rdf.store.AbstractTripleStore.getAxioms(AbstractTripleStore.java:1787) INFO : 41212 2012-11-06 08:38:41,875 : at com.bigdata.rdf.sail.BigdataSail.(BigdataSail.java:934) INFO : 41212 2012-11-06 08:38:41,875 : at com.bigdata.rdf.sail.BigdataSail. (BigdataSail.java:891) INFO : 41212 2012-11-06 08:38:41,875 : at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryConnection(BigdataRDFContext.java:1858) INFO : 41212 2012-11-06 08:38:41,875 : at com.bigdata.rdf.sail.webapp.QueryServlet.doEstCard(QueryServlet.java:1074) INFO : 41212 2012-11-06 08:38:41,875 : ... 23 more
Modifier and Type | Class and Description |
---|---|
static class |
TestConcurrentKBCreate.TestWithGroupCommit |
static class |
TestConcurrentKBCreate.TestWithoutGroupCommit |
TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestConcurrentKBCreate() |
TestConcurrentKBCreate(String name) |
Modifier and Type | Method and Description |
---|---|
void |
test_2KBCreateAndDiscovery()
A non-concurrent version with two KBs.
|
void |
test_concurrentKBCreateAndDiscovery()
Basic test of the concurrent create and discovery of a KB.
|
void |
test_concurrentKBCreateAndDiscoveryStressTestOnDistinctJournals()
Runs
test_concurrentKBCreateAndDiscovery() multiple times. |
void |
test_concurrentKBCreateAndDiscoveryStressTestOnSharedJournal()
Runs the concurrent KB Create and Discovery test multiple times against a
single journal, but using a distinct KB namespace for each test.
|
void |
test_CreateDestroy_ticket_948_00()
A non-concurrent version testing both create, destroy, and then re-create
where the KB properties have NOT been changed.
|
void |
test_CreateDestroy_ticket_948_01()
A non-concurrent version testing both create, destroy, and then re-create
where the KB properties have been changed (especially the Vocabulary class).
|
void |
test_CreateDestroy_ticket_948_02()
A non-concurrent version testing both create, destroy, and then re-create
where the KB properties have been changed (especially the Vocabulary class).
|
void |
test_KBCreateAndDestroy()
A non-concurrent version testing both create and destroy.
|
void |
test_KBCreateAndDiscovery()
A non-concurrent version, just to make sure that the basic logic works.
|
assertSameIterationAnyOrder, assertSameIterationAnyOrder, compare, createBindingSet, getDelegate, getOurDelegate, getProperties, getSail, getSail, reopenSail, setDelegate, setUp, tearDown
checkIfProxy, setUp, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public TestConcurrentKBCreate()
public TestConcurrentKBCreate(String name)
public void test_KBCreateAndDiscovery() throws Exception
Exception
public void test_KBCreateAndDestroy() throws Exception
Exception
public void test_2KBCreateAndDiscovery() throws Exception
Exception
public void test_CreateDestroy_ticket_948_00() throws Exception
public void test_CreateDestroy_ticket_948_01() throws Exception
public void test_CreateDestroy_ticket_948_02() throws Exception
In this variant, we shutdown the Journal and then re-open it.
public void test_concurrentKBCreateAndDiscovery() throws Exception
Exception
public void test_concurrentKBCreateAndDiscoveryStressTestOnSharedJournal() throws Exception
Note: This does not attempt to create the distinct KBs concurrently.
Exception
public void test_concurrentKBCreateAndDiscoveryStressTestOnDistinctJournals() throws Exception
test_concurrentKBCreateAndDiscovery()
multiple times. Each
time that test runs, it uses a distinct Journal
instance.Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.