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
Don't write job and job-related attributes when creating export model #11815
Don't write job and job-related attributes when creating export model #11815
Conversation
5175dbf
to
a8310a0
Compare
These aren't used in regular jobs (should only be needed for history export currently).
a8310a0
to
0a4aa46
Compare
lib/galaxy/model/store/__init__.py
Outdated
for icj in implicit_collection_jobs_dict.values(): | ||
icj_attrs = icj.serialize(self.security, self.serialization_options) | ||
icjs_attrs.append(icj_attrs) | ||
if not self.serialization_options.for_edit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That if looks iffy right? Maybe there should a TODO here and options used more clearly? I tried to make this code pretty general and it seems to be becoming more metadata specific slowly instead moving the other direction. for_edit
doesn't really naturally seem to imply serialize job data. I feel like it might be better to add options for including job data and set at a different level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think e7e3b00 looks better ?
e7e3b00
to
897590b
Compare
This PR was merged without a "kind/" label, please correct. |
Thanks a lot @mvdbeek! |
Ah shit ... you wanted to target 21.01? |
Ah, my bad ... yeah, I'll open a backport. |
…_metadata [21.01] Backport #11815: Don't write job and job-related attributes when creating export model
Very nice, this works pretty well on EU! Thanks a lot @mvdbeek! |
These aren't used in regular jobs (should only be needed for history export currently) and looping over the implicit collection jobs for each job is quadratic in runtime and inefficient.
What did you do?
Why did you make this change?
@bgruening mentioned that when a user submits 10000 map-over jobs he starts seeing slow query timing logs.
When this happens all of the active job worker threads are within
galaxy/model/__init__.py
:1536At this point Galaxy serializes all jobs that belong to an implicit collections jobs association.
Note that we only run through the export model by default since 21.01 (it was made the default in 7d0ec29).
How to test the changes?
(select the most appropriate option; if the latter, provide steps for testing below)
License
For UI Components