xuang7 commented on code in PR #4349:
URL: https://github.com/apache/texera/pull/4349#discussion_r3053711304
##########
common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/util/LakeFSStorageClient.scala:
##########
@@ -334,12 +362,12 @@ object LakeFSStorageClient {
* @return List of uncommitted object stats.
*/
def retrieveUncommittedObjects(repoName: String): List[Diff] = {
- branchesApi
- .diffBranch(repoName, branchName)
- .execute()
- .getResults
- .asScala
- .toList
+ fetchAllPages[Diff] { after =>
+ val request = branchesApi.diffBranch(repoName, branchName).amount(1000)
Review Comment:
The 1000 here is the page size for pagination. The fetchallpage will
continue requesting pages until all results are retrieved, so I chose a
relatively large value to reduce the number of requests. Would you recommend
making it configurable, or would using a named constant be sufficient?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]