Change warehouse raw data endpoint to stream response.#1792
Merged
aaronweeden merged 1 commit intoubccr:xdmod11.0from Feb 27, 2024
Merged
Change warehouse raw data endpoint to stream response.#1792aaronweeden merged 1 commit intoubccr:xdmod11.0from
aaronweeden merged 1 commit intoubccr:xdmod11.0from
Conversation
91ca7f2 to
c53032e
Compare
This was referenced Nov 22, 2023
a54693c to
9e5b3d1
Compare
9e5b3d1 to
5f94ecb
Compare
6 tasks
afcad93 to
5ee5dcb
Compare
3 tasks
c4a3f8f to
b328d05
Compare
b328d05 to
7679e80
Compare
7679e80 to
11b0cbe
Compare
eiffel777
approved these changes
Feb 27, 2024
11b0cbe to
ccfdb09
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR changes the
rest/warehouse/raw-dataendpoint to stream its response using chunked transfer encoding.The endpoint now uses unbuffered MySQL queries (
PDO::MYSQL_ATTR_USE_BUFFERED_QUERYis set tofalse).The endpoint now returns the entire result set rather than just a number of rows limited by the
rest_raw_row_limitsetting inportal_settings.ini. This PR removes that setting and therest/warehouse/raw-data/limitendpoint since these are no longer needed.For the Jobs realm, a request for multiple days of data is now run as multiple single-day queries to improve performance.
Motivation and Context
This PR makes it possible to obtain the entire result set while gaining the performance improvement from #1780 / #1800. This improves the responsiveness and simplifies the code in the
xdmod-dataAPI (see ubccr/xdmod-data#19).By using unbuffered MySQL queries, the PHP memory usage is also reduced.
Tests performed
This PR updates the regression tests to account for the fact that the entire result set is returned.
I also set up my
xdmod-devport with this branch, ran the script from https://github.com/ubccr/xdmod-xsede/pull/436 with the--timeargument, and confirmed there are no differences or duplicates.Checklist: