Skip to content

Fix MLWH cache MySQL query premature closure - #587

Merged
kjsanger merged 5 commits into
wtsi-npg:develfrom
kjsanger:fix/mlwh-cache
Sep 15, 2026
Merged

kjsanger merged 5 commits into
wtsi-npg:develfrom
kjsanger:fix/mlwh-cache

Conversation

@kjsanger

@kjsanger kjsanger commented Sep 2, 2026

Copy link
Copy Markdown
Member

New queries were being attempted against MySQL while an earlier query was still streaming results, resulting in only the first chunk of results being processed.

Refactor the cache to avoid this.

Improve maintainability by removing repeated string literals.

Change from sample_id/study_id to sample_uuid/study_uuid.

@kjsanger kjsanger added the bug Something isn't working label Sep 2, 2026
@kjsanger
kjsanger force-pushed the fix/mlwh-cache branch 5 times, most recently from cb45c05 to f55ed01 Compare September 3, 2026 15:18
Comment thread src/npg_irods/db/mlwh.py

@mksanger mksanger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Comment thread src/npg_irods/db/mlwh.py
Comment thread src/npg_irods/db/mlwh_cache.py
Comment thread src/npg_irods/db/mlwh.py
Comment thread tests/test_mlwh_cache.py Outdated
Comment thread tests/test_mlwh_cache.py
Comment thread tests/test_mlwh_cache.py Outdated
New queries were being attempted against MySQL while an earlier query
was still streaming results, resulting in only the first chunk of
results being processed.

Refactor the cache to avoid this.

Improve maintainability by removing repeated string literals.

Change from sample_id/study_id to sample_uuid/study_uuid.
Revert to using Study ID for study queries because Study UUIDs are not
available in iRODS.
@kjsanger
kjsanger merged commit 385249c into wtsi-npg:devel Sep 15, 2026
6 checks passed
@kjsanger
kjsanger deleted the fix/mlwh-cache branch September 15, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants