Test suite for the concurrent create and discovery of a KB instance.
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