Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

fix: have elasticsearch return all items#486

Merged
alangsto merged 1 commit intomasterfrom
alangsto/remove_custom_pagination
Sep 17, 2021
Merged

fix: have elasticsearch return all items#486
alangsto merged 1 commit intomasterfrom
alangsto/remove_custom_pagination

Conversation

@alangsto
Copy link
Copy Markdown
Contributor

@alangsto alangsto commented Sep 17, 2021

ES searches are only returning 10 results when we use execute. We tried to return the total amount of documents using execute here https://github.com/edx/edx-analytics-data-api/pull/484, but courses with more than 10,000 learners would error out due to the result window being too large.

Scan does not have this same limitation, however, it may cause memory pressure. I believe that this PR would at least cause the behavior of the learner endpoint to be consistent with its performance pre ES/ES-dsl library upgrade.

@alangsto alangsto force-pushed the alangsto/remove_custom_pagination branch 3 times, most recently from 095741a to 11e1178 Compare September 17, 2021 17:36
Copy link
Copy Markdown
Contributor

@matthugs matthugs left a comment

Choose a reason for hiding this comment

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

modulo missing update to tests, which were present in our last iteration of this fix

@alangsto alangsto force-pushed the alangsto/remove_custom_pagination branch from 11e1178 to 43aeda6 Compare September 17, 2021 18:31
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #486 (43aeda6) into master (ef5c24a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #486   +/-   ##
=======================================
  Coverage   97.28%   97.29%           
=======================================
  Files          56       56           
  Lines        3612     3617    +5     
  Branches      319      319           
=======================================
+ Hits         3514     3519    +5     
  Misses         69       69           
  Partials       29       29           
Impacted Files Coverage Δ
analytics_data_api/v0/documents.py 97.97% <100.00%> (ø)
analytics_data_api/v0/tests/views/test_learners.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef5c24a...43aeda6. Read the comment docs.

Copy link
Copy Markdown
Contributor

@schenedx schenedx left a comment

Choose a reason for hiding this comment

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

👍 Let's try it.

@alangsto alangsto merged commit da215e7 into master Sep 17, 2021
@alangsto alangsto deleted the alangsto/remove_custom_pagination branch September 17, 2021 18:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants