New server side endpoint for getting (all) mutations, which provides data in chunks #617
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The backend provides a list of all the mutations present in the tree initially. Otherwise, mutations are referred to by numeric ID. In #613 Angie Hinrichs describes a problem whereby for trees for very large organisms, when encoded in JSON the list of mutations is more than 1 GB which is more than the JS string limit. This imposes a number of problems.
This PR mitigates some of these problems. Previously the mutations were returned as part of the
/config
endpoint. Now we create a new additional endpoint/mutations/
that provides chunked data with an event stream so mutations can be processed in batches rather than needing to handle a 1 GB string.There is a separate issue in terms of actually reading in the mutations, which are in the first line of the JSONL file. That is being explored in #614.