geniusjoe commented on code in PR #25274:
URL: https://github.com/apache/pulsar/pull/25274#discussion_r2879030182
##########
conf/pulsar_env.sh:
##########
@@ -89,8 +89,13 @@ if [[ -z "$PULSAR_GC_LOG" ]]; then
fi
fi
-# Extra options to be passed to the jvm
-PULSAR_EXTRA_OPTS="${PULSAR_EXTRA_OPTS:-" -Dpulsar.allocator.exit_on_oom=true
-Dio.netty.recycler.maxCapacityPerThread=4096"}"
+# Extra options to be passed to the jvm, typically used for passing
user-defined JVM OPTS configurations.
+# This PULSAR_EXTRA_OPTS parameter has a higher priority than the predefined
JVM OPTS in the Pulsar bin files.
+# Therefore, in addition to defining extra JVM parameters here,
+# it can also be used to override JVM parameters with the same name in OPTS
+# For example, if IPv6 functionality needs to be enabled, configure:
+# PULSAR_EXTRA_OPTS="${PULSAR_EXTRA_OPTS} -Djava.net.preferIPv4Stack=false"
+PULSAR_EXTRA_OPTS="${PULSAR_EXTRA_OPTS}"
Review Comment:
@lhotari
First of all, thank you very much for your review, and I apologize for
affecting your review by using force-push. I will not use force-push mode for
commits in the future.
I think that for a Pulsar release version, users during initial use may not
focus heavily on the internal JVM implementation details in the `bin/`
directory. Maybe they are likely to pay more attention to custom configurations
in the `conf/` directory.
For these three environment files `bkenv.sh`, `pulsar_env.sh`, and
`pulsar_tools_env.sh` in `conf/`, should we consider referencing the approach
used in other configurations? Specifically, we could comment out the variables
while retaining the explanatory comments, informing users that they can
override JVM configurations in `OPTS` here, and do not place the relevant
comments in the corresponding `bin/` files. Taking `conf/pulsar_env.sh` as an
example:
```
# Extra options to be passed to the jvm, typically used for passing
user-defined JVM OPTS configurations.
# This PULSAR_EXTRA_OPTS parameter has a higher priority than the predefined
JVM OPTS in the Pulsar bin files.
# Therefore, in addition to defining extra JVM parameters here,
# it can also be used to override JVM parameters with the same name in OPTS
# For example, if IPv6 functionality needs to be enabled, configure:
# PULSAR_EXTRA_OPTS="${PULSAR_EXTRA_OPTS} -Djava.net.preferIPv4Stack=false"
# If you need to obtain more details, you can refer to the generation
strategy of `OPTS` in the `bin/pulsar` file
# PULSAR_EXTRA_OPTS=
```
--
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]