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

Failure to setup SERVICE hook and changeLog for Unisolated and Read/Write connections

    XMLWordPrintable

    Details

      Description

      BigdataSail.getConnectionInternal() needs to be refactored. It is properly used to obtain a connection from either getReadWriteConnection(), getUnisolatedConnection(), or getReadOnlyConnection(). However, it should not be used to perform initialization of that connection since this pattern fails to provide appropriate initialization for the public methods getReadWriteConnection(), getUnisolatedConnection(), and getReadOnlyConnection(long).

      The impact of the current code structure is that the SERVICE hook is not applied and the changeLog is not initialized unless getConnection() is invoked on the Sail.

      The change is to lift out that initialization logic into a new private method and then invoke it from each of:

      getReadWriteConnection()
      getUnisolatedConnection()
      getReadOnlyConnection(long)
      

      Note that getReadOnlyConnection() does not actually initialize either the SERVICE hook or the changeLog. However, it would be useful to collect all the connection initialization logic into a single location.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: