Skip to content

Conversation

@pinkenburg
Copy link
Collaborator

@pinkenburg pinkenburg commented Jan 5, 2024

This PR fixes a problem we had where users inserted payloads where the creation of the path for the file failed since the user did not have write permission. The resulting entry in the cdb brought everything to a screeching halt since it checks if all calibrations exist. This result then in misleading error messages where you load a given calibration but the error mentions a completely different one. E.g. with our interface, trying to read the Centrality calibration:
getCalibration("Centrality",120000)
results in
BaseException: Could not find payload <cemc_PDC_ResidualCorr/41/ab/41ab0d98bff8206763951a48d3461252_pdc_res_e_eta.root> in any of the following read dirs: /cvmfs/sphenix.sdcc.bnl.gov/calibrations/sphnxpro/cdb/ /sphenix/cvmfscalib/sphnxpro/cdb/"
which made us look into parsing problems to see how Centrality changes to cemc_PDC_ResidualCorr

Now it will throw a BaseException if the creation of the directory or the file copying fails. This PR sits on top of the recent ntry PR since both affect the nopayloadclient.cpp
THe main technical change is swapping the order of inserting a calibration and writing it. In the original version the calibration was inserted and then the file was copied. If one wants to catch a write error the writing has to be done before inserting the calibration

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant