Skip to content

failure to evolve a std::map value #20421

@tomeichlersmith

Description

@tomeichlersmith

Check duplicate issues.

  • Checked for duplicates

Description

I have a type (called Header in the reproducer) that is the value type of a std::map stored in a TTree. I can read/write this branch header_map of the TTree just fine, but when I apply read schema rules to the Header class, all of the values are then 0 - seemingly like what was observed in #19650 - so I'm guessing that there is a similar address-setting issue.

$ ./write # writes ten entries into the TTree
$ ./read-v1 # reads with original version used to write
{ 0: {run: 42, event: 0} }
{ 1: {run: 42, event: 10} }
{ 2: {run: 42, event: 20} }
{ 3: {run: 42, event: 30} }
# etc...
$ ./read-v2 # reads with updated version with schema rules
{ 0: {applying v1->v2 schema evolution rule
 run: 0, event: 0} }
{ 1: {applying v1->v2 schema evolution rule
 run: 0, event: 0} }
{ 2: {applying v1->v2 schema evolution rule
 run: 0, event: 0} }
{ 3: {applying v1->v2 schema evolution rule
 run: 0, event: 0} }
# etc...

Reproducer

The reproducer is available on GitHub: https://github.com/tomeichlersmith/ldmx-root-schema-evolution-testbench/tree/main/forum/schema-evolve-std-map-value

(The forum/schema-evolve-std-map-value subdirectory of tomeichlersmith/ldmx-root-schema-evolution-testbench`.)

ROOT version

ROOT Version: 6.38.00-rc1
Platform: linuxx8664gcc
Compiler: 13.3.0

Specifically, I am using a container image where ROOT is configured and built as defined here

Installation method

build from source

Operating system

Linux (Ubuntu 24.04)

Additional context

Found while testing my solution to my forum post about schema evolution while slow cloning with more types that are in use in ldmx-sw. https://root-forum.cern.ch/t/quiet-writing-failure-when-applying-schema-evolution-while-slow-cloning/64350

In that forum post, I was looking at just using the current-LDMX-standard ROOT 6.34, but it has this issue so I updated to 6.38.00-rc1 to see if it had been resolved since.

Potentially Related

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions