Skip to content

[9.1] refactor (TS DB): get the additional parameters of all the transformations in one query - #8856

Draft
chrisburr wants to merge 1 commit into
DIRACGrid:integrationfrom
chrisburr:perf/bulk-transformation-extra-params
Draft

chrisburr wants to merge 1 commit into
DIRACGrid:integrationfrom
chrisburr:perf/bulk-transformation-extra-params

Conversation

@chrisburr

Copy link
Copy Markdown
Member

TransformationDB.getTransformations(..., extraParams=True) ran one query on AdditionalParameters per returned transformation (the TODO: optimize by getting all the extra params at once). They are now read with a single IN (...) query per 1000 transformations and matched back to each transformation, and getAdditionalParameters goes through the same code. The result is unchanged, including the conversion of IntType/LongType values.

This makes it cheap to read the additional parameters of a list of transformations in one service call, e.g. getTransformations({"TransformationID": transIDs}, columns=["TransformationID"], extraParams=True), which LHCbDIRAC's MCSimulationTestingAgent now does every cycle.

BEGINRELEASENOTES

*TransformationSystem
CHANGE: TransformationDB.getTransformations reads the additional parameters of all the transformations at once when extraParams is set

ENDRELEASENOTES

…tions in one query

getTransformations with extraParams=True ran one query on AdditionalParameters
per returned transformation. They are now read with one query per 1000
transformations, which getAdditionalParameters also uses.
@chrisburr
chrisburr force-pushed the perf/bulk-transformation-extra-params branch from 021502f to 82766c0 Compare October 27, 2026 12:23
@chrisburr chrisburr changed the title [9.1] perf (TS DB): get the additional parameters of all the transformations in one query [9.1] refactor (TS DB): get the additional parameters of all the transformations in one query Oct 27, 2026
@aldbr

aldbr commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

I am investigating the failing tests, this is due to one of my private PR I think

@aldbr

aldbr commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

At least some should be fixed with: #8858

@fstagni fstagni closed this Oct 27, 2026
@fstagni fstagni reopened this Oct 27, 2026

This branch has not been deployed

No deployments
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.

3 participants