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

TestEmbeddedClient.test_registerIndex fails when getIndex is called between dropIndexFromCache and the final getIndex verification

    Details

      Description

      To observe this failure, add the following line to the end of AbstractIndexCache.dropIndexFromCache (~line 229, either inside or outside the synchronize block):

      T readVal = getIndex(name,ITx.READ_COMMITTED);

      then run the test; that is,

      ant -DtestName=com.bigdata.service.TestEmbeddedClient junit

      Although the index registration appears to succeed, the test
      delcares failure because the call to getIndex at the end of TestEmbeddedClient, to verify that the registered index was indeed dropped, does not return null as expected.

      One potential fix may be to add the following method to the
      class, AbstractScaleOutFederation:

      public void dropIndex(String name) {

      super.dropIndex(name);

      try {

      getMetadataIndexCache().dropIndexFromCache(name);

      getIndexCache().dropIndexFromCache(name);

      } catch (Exception e) {

      throw new RuntimeException( e );

      }

      }

      Adding a method like that shown above to AbstractScaleOutFederaton results in TestEmbeddedClient passing, even with the additional
      call to getIndex. But it should be noted that the method above was
      not arrived at through deep root-cause analysis, but empirically, through trial and error. Thus, this trac issue has been filed
      as a means to track a potential issue with how the registerIndex, dropIndex, and getIndex/newView methods interact; which may need additional, deeper analysis than what has occurred to this point.

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        Closed. Not relevant to the new architecture.

        Show
        bryanthompson bryanthompson added a comment - Closed. Not relevant to the new architecture.

          People

          • Assignee:
            Unassigned
            Reporter:
            btmurphy btmurphy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: