Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-2075

Fix BigdataSail tests which do not correctly close connections

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: BLAZEGRAPH_2_X_BACKLOG
    • Component/s: CI
    • Labels:
      None

      Description

      Since BLZG-2041, BigdataSail now does the standard 20 second await connection close on shutdown. This means that if the sail connections are not closed in a timely fashion by a test, then they remain open for a given namespace and the BigdataSail continues to exist for that namespace.

      This can then overlap with another test with a different configuration.
      Boom.
      Stochastic.

      Here is a sample stack trace

      java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: java.lang.RuntimeException: java.lang.IllegalStateException: Already assigned: old=TermId(0U)[http://www.w3.org/2001/XMLSchema#boolean], new=Vocab(-55), this: http://www.w3.org/2001/XMLSchema#boolean
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at com.bigdata.rdf.sail.BigdataSail.create(BigdataSail.java:884)
      	at com.bigdata.rdf.sail.BigdataSail.<init>(BigdataSail.java:621)
      	at com.bigdata.rdf.sail.TestBigdataSailWithoutSids.getSail(TestBigdataSailWithoutSids.java:150)
      	at com.bigdata.rdf.sail.ProxyBigdataSailTestCase.getSail(ProxyBigdataSailTestCase.java:239)
      	at com.bigdata.rdf.sail.TestTicket2043.testBug(TestTicket2043.java:101)
      

      We will need to clean up the tests to explicitly close connections correctly and ensure that they are calling __tearDown...()

      You can modify the SailBase.shutdown() logic to log a message which we could then use to track this down.
      See SailBase.shutDown(). This is an openrdf class which we have forked.

      See this code:
      if (context.trace == null) {
      logger.warn(
      "Closing active connection due to shut down; consider setting the {} system property",
      DEBUG_PROP);
      }
      else {
      logger.warn("Closing active connection due to shut down, connection was acquired in",
      context.trace);
      }
      
      

      The DEBUG_PROP could help spot the bad citizens.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              igorkim igorkim
              Reporter:
              bryanthompson bryanthompson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: