-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix(bpdm-orchestrator): introduced pagination for handling pending and retention timeouts #1029
Conversation
0a7cb97
to
950d1e0
Compare
950d1e0
to
6671d3a
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.
The logic looks sound to me but I think using such an unspecifc public function in the golden record task service in which you can basically place in any fetch and process function to be executed seems to be quite over the top. Especially when we consider that the TimeoutProcessBatchService does have two very similar methods that just differentiate in between which they give delegates as parameters to that function in the golden record task service.
Why not just create two separate functions in the golden record task service, one for fetching and processing pending timeouts, one for fetching and processing retention timeouts. If you then want to reduce duplicate code you could create a private function for batch processing these functions.
6671d3a
to
0e8329b
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.
Details for my previous comments in the code
...or/src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/service/GoldenRecordTaskService.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/service/TimeoutProcessBatchService.kt
Outdated
Show resolved
Hide resolved
Yeah, will refactor code accordingly. |
@nicoprow, i have adapted changes as suggested. |
fed9f73
to
f3587bc
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.
Looks good to me. Minor suggestions in the comments
...src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/service/TimeoutProcessBatchService.kt
Show resolved
Hide resolved
...src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/service/TimeoutProcessBatchService.kt
Show resolved
Hide resolved
…d retention timeouts fix(bpdm-orchestrator): updated changelog fix(bpdm-orchestrator): introduced pagination for handling pending and retention timeouts fix(bpdm-orchestrator): introduced pagination for handling pending and retention timeouts
c1e1459
to
066617e
Compare
Description
This pull request introduces pagination for handling pending and retention timeouts in the orchestrator. By processing tasks in manageable batches, the changes prevent out-of-memory errors during the execution of large volumes of tasks, improving the system's stability and efficiency.
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review: