Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7009

Schema evolution rule only applied when class members have certain order

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.34/23
    • Fix Version/s: 6.04.00, 5.34/26, 6.02/05
    • Component/s: I/O
    • Labels:
      None
    • Environment:

      linux

      Description

      The attached example contains two versions of MyClass, with suffixes _v1.h and _v2.h. Version 1 is used for writing, 2 for reading. I built a schema evolution rule that mainly prints if it is applied.

      The problem I have (and spent rather too much time trying to reproduce) can be seen by running:
      ./run.sh
      Note the
      Processing readTree.C...
      ver: 2
      This indicates the rule isn't executed, but the on-file content of ver (=1) is not read, either (ver=2 is set by MyClass v2 constructor).

      Now open MyClass_v1.h and exchange the order of std::vector<int> fArray and int ver, and rerun ./run.sh:
      Processing readTree.C...
      rule reading class version: 1
      ver: 99

      This time, the rule is executed, ver=1 is read correctly from file, and set to 99 in memory.

        Attachments

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              1a6d63d41e0230d528a8 Christian Pulvermacher
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: