Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

higher scrutiny on changes to RAW data formats #42719

Open
missirol opened this issue Sep 5, 2023 · 7 comments
Open

higher scrutiny on changes to RAW data formats #42719

missirol opened this issue Sep 5, 2023 · 7 comments

Comments

@missirol
Copy link
Contributor

missirol commented Sep 5, 2023

Early on in the review of #42634, @fwyzard caught by eye a change which affected one of the data formats of the RAW data tier, and would have changed the meaning of existing data when reading it with the latest releases (see #42634 (comment) and replies).

In fact, it was later realised that a similar mistake did go in in CMSSW_12_3_0_pre2 (#42634 (comment)). In our understanding, this means that any later release would misinterpret the content of older RAW data for that specific data format.

A while go, Core-sw introduced tests to ensure the backward-compatibility of changes to data formats of the RAW data tier (see cms-sw/framework-team#530 and links therein). As far as I understand, a problem such as #42634 (comment) goes beyond the scope of those unit tests. Still, I'm left wondering how we should avoid this kind of issue moving forward.

Questions:

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2023

A new Issue was created by @missirol Marino Missiroli.

@Dr15Jones, @rappoccio, @smuzaffar, @makortel, @sextonkennedy, @antoniovilela can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@fwyzard
Copy link
Contributor

fwyzard commented Sep 5, 2023

assign core, l1, hlt

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2023

New categories assigned: core,hlt,l1

@epalencia,@mmusich,@missirol,@Dr15Jones,@smuzaffar,@aloeliger,@makortel,@Martin-Grunewald you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

makortel commented Sep 5, 2023

  • Would it be useful/feasible for Core-Sw to review all PRs that involve changes to the RAW (and RawPrime ?) data formats ?

For the particular case of #36018 (e.g. assuming the PR would have been assigned to core ) I'm not confident at all that I personally would have realized the enum is stored as part of RAW. I would also argue in this case the change is in how the data is interpreted rather than how it is stored (the enum is stored as an integer, and the additional enum element did not cause the integer width to change).

I don't think adding more eyes would be the best way forward. Core's responsibility has been to ensure the bits of the data formats are read correctly, while the correctness of the interpretation has been left to the owners of the data formats.

If the tests added in #41565 would have used the enum representation of the data rather than always going through integer values (that was a reasonable choice for ensuring the bits are read correctly), it should have caught the new enum being added.

  • Does Core-Sw have any suggestions/recommendations ?

I agree tests for the interpretation of the enum should be added.

I'd also suggest to add comments for all the relevant classes / enums / etc that these are part of the RAW data, and one needs to be careful when modifying them. And for enums especially instructions where to add new elements.

@Dr15Jones suggested to number the enum elements explicitly for enums in data formats, that would make it very clear the consequences of adding an element in the middle.

@makortel
Copy link
Contributor

makortel commented Sep 5, 2023

In the core software meeting today it was noted that at the time the #36018 was merged (CMSSW_12_3_0_pre2), the physics validation was still presumably done using Run 2 data. In principle that validation could have caught the mistake, but apparently it didn't.

A question on how the GlobalTriggerObjectMap is being monitored in DQM was also brought up. Perhaps there is room for improvement in general for monitoring the (unpacked) contents of RAW data?

@cms-sw/pdmv-l2 @cms-sw/dqm-l2

@makortel
Copy link
Contributor

makortel commented Sep 5, 2023

We should also understand how the GlobalTriggerObjectMap, and especially GlobalObjectMap::operandTokenVector() is used downstream. The main consumer seems to be HLTL1TSeed, that is used as part of the HLT menu, but it is currently unclear if this information is propagated onwards as part of higher-level data products.

One way to make the pre-CMSSW_12_3_0_pre2 GlobalTriggerObjectMap to be interpreted correctly again would be to add a configuration parameter to HLTL1TSeed to control whether a fix needs to be applied or not, and control that with e.g. an era modifier. A challenge is that the need of the fix is determined by the release used to write the GlobalTriggerObjectMap (e.g. while all Run 2 data need the fix, any Run 2 MC produced with 12_3_0_pre2 or afterwards do not). In principle the version information is part of the provenance information, but using that information as part of the data processing would have a cost.

@missirol
Copy link
Contributor Author

@Dr15Jones suggested to number the enum elements explicitly for enums in data formats, that would make it very clear the consequences of adding an element in the middle.

Thanks for this suggestion. I tried to implement it in #43022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants