-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#11015] break down question result fetch by section #11567
[#11015] break down question result fetch by section #11567
Conversation
…eakdown of section by giver and receiver
… and use map to directly de-duplicate
da8a0f0
to
62f7ad8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more tests. There are no tests for fetch type that is not BOTH
right now.
@wkurniawan07 src/test/java/teammates/ui/webapi/GetSessionResultsActionTest.java |
This is merely testing that the API returns the value as returned by
E2E tests cannot replace lower level tests. |
7686905
to
52521b8
Compare
src/test/java/teammates/logic/core/FeedbackResponsesLogicTest.java
Outdated
Show resolved
Hide resolved
src/test/java/teammates/logic/core/FeedbackResponsesLogicTest.java
Outdated
Show resolved
Hide resolved
Guys, This PR seems to be stalling (no activities for the past 7 days). 🐌 😢 |
Guys, This PR seems to be stalling (no activities for the past 7 days). 🐌 😢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delayed review. Just one change requested.
Also, please ensure that the section results are fetched sequentially in order to prevent burst of requests in courses with large number of sections. (I did see the concatMap
, so just need to double confirm)
intent: Intent.FULL_DETAIL, | ||
groupBySection: sectionName, | ||
sectionByGiverReceiver: 'receiver', | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be a need to split by giver/receiver here. There is a high likelihood for large amount of duplicates. Splitting by section is enough to give the needed performance boost.
It does mean that the back-end split of giver/receiver is not actually needed right now, but they can and will have their uses in other view types (GRQ and alike) eventually, so no work is wasted here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to 'both'. Works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No outstanding change requests. I will give the official approval once the lint violation is fixed. (very minor)
76f41c1
to
6b142f2
Compare
Fixes #11015
Refactor of #11017 due to branch diversion
Original problem
Feedback result page from session with too many responses will cause backend timeout or OOM. This is because of the sheer amount of data to be processed and kept in memory within one API call, and therefore suffers from scalability problem.
Outline of Solution
Frontend
When fetching feedback result with
FULL_DETAIL
intent, fetch by giver's and receiver's section separately. This is to ensure the scalability of result fetch action from the frontend and is guaranteed by the section size limit.Backend
Adds
ResultFetchType
parameter which fetches feedback responses bygiverSection
,receiverSection
, or both. This is only applied inFULL_DETAIL
intent, and will be expanded toforUser
result fetch should there be concerns arising from that data path.Testing
FeedbackResultsPageE2E
test should cover the frontend correctness of this solution.Unit tests are created to ensure the parameters are working as intended.