lhotari commented on code in PR #25274:
URL: https://github.com/apache/pulsar/pull/25274#discussion_r2879598768
##########
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:
@geniusjoe There's already a documentation section in `bin/pulsar`:
https://github.com/apache/pulsar/blob/d992dc530bea4f4737da93f1527133b1c9389a45/bin/pulsar#L77-L95
It feels like the correct place to document the environment variable
configuration.
In addition, there should be documentation in https://pulsar.apache.org/docs
.
I agree that users focusing on bare metal / VM deployments would look into
`conf` directory. However,
I'd assume that the majority of Pulsar users use Kubernetes for deployment.
In that case, the `pulsar_env.sh` isn't very useful. Setting environment
variables directly is more convenient. That's another reason why environment
variables should be documented in Pulsar's documentation.
--
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]