-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
issue#9345 -- bug fix for RuntimeUtils.getCmd not setting pending-async-requests #9349
issue#9345 -- bug fix for RuntimeUtils.getCmd not setting pending-async-requests #9349
Conversation
@nlu90 Please also help review this PR |
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
/pulsarbot run-failure-checks |
Please merge the newest master and rerun tests |
5b2b4cf
to
e9d5078
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
@csthomas1 thanks for fix! |
9f32c2c
to
bbcc5af
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
sorry for the late reply
…pending-async-requests argument supported by JavaInstanceStarter
bbcc5af
to
52badee
Compare
/pulsarbot run-failure-checks |
…ax_pending_async_requests
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
@csthomas1 Looks like the test failed by this change. Could you please take a look? move this to the next release. |
… to Java instances, and updated Runtime unit tests accordingly
/pulsarbot run-failure-checks |
@csthomas1 Awesome! Thank you for your contribution! |
…nc-requests (apache#9349) Fixes apache#9345 ### Motivation When I enable either the Process or Kubernetes function Runtimes and set the parameter "maxPendingAsyncRequests" to a value other than 1000 in the function worker configuration (e.g. functions_worker.yml), any function instances launched by the worker continue to have maxPendingAsyncRequests = 1000. I'd like to be able to adjust this parameter to guard against my function running out of memory -- without increasing the function heap size -- due to too many publish operations in flight, as can occur when the output topic's backlog quota has been reached. ### Modifications Modified RuntimeUtils.getCmd to add --pending-sync-requests to the list of arguments passed to JavaInstanceStarter ### Verifying this change This change added tests and can be verified as follows: - Updated pulsar-functions/runtime/src/test/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntimeTest.java to test for presence of --pending-async-requests argument in generated commandline, and increased expected arg counts by 2 to account for expected presence of --pending-async-requests <value> - Updated pulsar-functions/runtime/src/test/java/org/apache/pulsar/functions/runtime/process/ProcessRuntimeTest.java to test for presence of --pending-async-requests argument in generated commandline, and increased expected arg counts by 2 to account for expected presence of --pending-async-requests <value> - Updated pulsar-functions/runtime/src/test/java/org/apache/pulsar/functions/worker/WorkerApiV2ResourceConfigTest.java to verify that the configured value of "maxPendingAsyncRequests" was being properly loaded into the WorkerConfig
this patch does not apply to branch-7.2 |
Fixes #9345
Motivation
When I enable either the Process or Kubernetes function Runtimes and set the parameter "maxPendingAsyncRequests" to a value other than 1000 in the function worker configuration (e.g. functions_worker.yml), any function instances launched by the worker continue to have maxPendingAsyncRequests = 1000. I'd like to be able to adjust this parameter to guard against my function running out of memory -- without increasing the function heap size -- due to too many publish operations in flight, as can occur when the output topic's backlog quota has been reached.
Modifications
Modified RuntimeUtils.getCmd to add --pending-sync-requests to the list of arguments passed to JavaInstanceStarter
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation