Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-17083

Roxie: Different version of index already loaded error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.2.6, 6.2.4
    • Fix Version/s: 6.4.0
    • Component/s: Roxie
    • Labels:
      None

      Description

      The following code will recreate the error via a manual process, but I originally found the problem while using PackageMaps.

      Step 1: Set up a Roxie query

      #WORKUNIT('name', 'index_cache_test_dsc');
      
      SampleRec := {UNSIGNED4 n};
      
      idx := INDEX({SampleRec.n}, {}, '~testing::index_cache', OPT);
      
      OUTPUT(MAX(idx, n), NAMED('MaxValue'));
      

      This works without any data loaded and returns a zero value as a result.

      Step 2: Create initial data

      IMPORT Std;
      
      Std.File.CreateSuperFile('~testing::index_cache', allowExist := TRUE);
      
      SampleRec := {UNSIGNED4 n};
      
      ds1 := DATASET(100, TRANSFORM(SampleRec, SELF.n := RANDOM() % 100));
      idx1 := INDEX(ds1, {n}, {}, '~testing::index_cache::idx');
      BUILD(idx1, OVERWRITE);
      Std.File.AddSuperFile('~testing::index_cache', '~testing::index_cache::idx');
      

      The query will now work, probably returning 99 (or some high number less than 100).

      Step 3: "Accidentally" attempt to overwrite the index (note: it may be important that this new attempt will try to create an index with a different number of records)

      IMPORT Std;
      
      SampleRec := {UNSIGNED4 n};
      
      ds2 := DATASET(200, TRANSFORM(SampleRec, SELF.n := RANDOM() % 200));
      idx2 := INDEX(ds2, {n}, {}, '~testing::index_cache::idx');
      BUILD(idx2, OVERWRITE);
      Std.File.AddSuperFile('~testing::index_cache', '~testing::index_cache::idx');
      

      This will fail with the following error:

      Error:    System error: -1: Graph graph1[1], detach: Cannot remove file testing::index_cache::idx as owned by SuperFile(s): testing::index_cache (0, 0), -1, 
      

      Step 4: Using ECL Watch, remove the existing 'testing::index_cache::idx' file from the 'testing::index_cache' superfile. I did not actually delete the file, but that may not matter.

      Step 5: Re-run step #3. It will succeed.

      Step 6: Execute the Roxie query again. It will fail with the following error:

      Exception
      Reported by: Roxie
      Message: Different version of testing::index_cache::idx already loaded: sizes = 32768 32768 Date = 2017-02-15T13:34:14 2017-02-15T13:32:16 
      

      At this point it is nearly impossible to clear the error for an index with that name. The only workaround I have found is restarting the Roxie process.

        Attachments

          Activity

            People

            • Assignee:
              richardkchapman Richard Chapman
              Reporter:
              dcamper Dan S. Camper
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: