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

Avoid aggregate_assets_summary upon every version save #1375

Closed
yarikoptic opened this issue Nov 21, 2022 · 1 comment
Closed

Avoid aggregate_assets_summary upon every version save #1375

yarikoptic opened this issue Nov 21, 2022 · 1 comment

Comments

@yarikoptic
Copy link
Member

triggered by @mvandenburgh have written in #1372

The main contributor to the potentially long validation time is the fact that we loop over every Asset in a Version when it's being saved https://github.com/dandi/dandi-archive/blob/master/dandiapi/api/models/version.py#L237-L242.

which calls out to aggregate_assets_summary.

If that is the case, and we do save version to update its modified upon each asset validation since https://github.com/dandi/dandi-archive/pull/1366/files -- I feel like we might be piling up lots of actions we should avoid or "debounce". What does happen when I upload e.g. 10 assets -- will we have 10+ aggregate_assets_summary guaranteed to be ran?

@mvandenburgh
Copy link
Member

Closed by #1431

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

No branches or pull requests

2 participants