Per-user major operation limit for classification grids and exports
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Read library/django_utils/major_operation.py and MajorOperationViewMixin first, then inspect the listed export views and the classification and grouping DataTables grids. Decide how limits should differ for exports and machine users, how streamed operations refresh slot expiry, and how statement timeouts interact with batch reads. Done means the uncovered exports and grids have suitable per-user concurrency limits, with streamed slots held for the operation's duration.
Written by the indexing model from the issue text.
Description
🤖 Written by Claude
Classification exports have no per-user concurrency limit, so one user can run several heavy exports at once. Several JSON exports running together is what led to #2867.
What exists: library/django_utils/major_operation.py:major_operation caps a user's concurrent heavy operations and lowers statement_timeout while one runs. MajorOperationViewMixin opts a class-based view in with major_operation_name, and for a streamed response it holds the slot until the stream finishes or the client disconnects. Only the node grid (analysis/views/views_grid.py) and three variantopedia grids (variant_tags, all_variants, tagged_variants) use it.
Not covered:
classification_grouping_export(classification/views/exports_grouping/classification_grouping_export_view.py:serve_export): JSON, CSV, VCF, Franklin.export_classifications_grid/export_classifications_grid_redcap(classification/views/views.py).classification_export_api(classification/views/classification_export_view.py:ClassificationApiExportView).- The classification and grouping DataTables grids.
Things to settle:
- Limit size:
MAJOR_OPERATION_MAX_CONCURRENT_PER_USERis 20 and shared by every operation type, so it wouldn't stop a handful of exports. Exports may need a lower limit of their own, e.g. an optional per-operation limit inmajor_operation. - Slot expiry vs export length:
MAJOR_OPERATION_SLOT_EXPIRE_SECONDSis 10 minutes, a safety expiry for crashed requests. A large JSON export can stream for longer than that, after which its slot is freed while it is still running. The streamed-response holder may need to refresh the expiry as it yields. - Statement timeout:
MAJOR_OPERATION_STATEMENT_TIMEOUT_SECONDS(5 minutes) applies to each statement. That is fine once #2867 reads in batches, but a single.iterator()cursor query would hit it. - Machine users: the API export is used by integrations and sync, whose accounts might legitimately run several at once. Decide whether they share the limit.
- Function views:
serve_exportand the grid export views are function views, so they needmajor_operationused directly and the streamed response wrapped the same wayMajorOperationViewMixindoes it (_StreamHoldingOperation). Factoring that wrapping out would serve both.
- Dominant language
- Python
- Stars
- 31
- Forks
- 4
- Avg merge
- 4h 52m
- Merged PRs (30d)
- 183
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SACGF/variantgrid
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
SACGF/variantgrid#2964 · 1 comment ·
Maintainers usually reply within 1 day
-
Genome build now duplicated in "imported as" on allele pagePossibly taken @TheMadBug claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
SACGF/variantgrid#2950 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
SACGF/variantgrid#2865 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SACGF/variantgrid#2647 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
SACGF/variantgrid#2341 · 3 comments ·
Maintainers usually reply within 1 day
All issues in SACGF/variantgrid
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day