github-actions[bot] commented on code in PR #68713: URL: https://github.com/apache/doris/pull/68713#discussion_r4415949320
########## be/src/common/config.cpp: ########## @@ -1922,6 +1922,32 @@ DEFINE_mDouble(max_hdfs_wirter_jni_heap_usage_ratio, "0.5"); DEFINE_mInt64(hdfs_jni_write_sleep_milliseconds, "300"); // The max retry times when hdfs write failed DEFINE_mInt64(hdfs_jni_write_max_retry_time, "3"); +// The share of the JVM's maximum heap that the JNI scanners admitted by the heap they declare may +// declare together. Only statements with enable_jni_heap_admission declare it +// (util/jni_scan_heap_gate.h) +DEFINE_mDouble(jni_scanner_heap_budget_ratio, "0.5"); Review Comment: [P1] Validate the heap-gate settings before publishing them. These mutable fields have no validator, and config::strtox accepts values such as `nan`, `-1`, and `2`. A NaN ratio reaches the floating-to-int64 conversion in `jvm_heap_budget()` (undefined behavior); a ratio above 1 admits more declared bytes than the JVM heap; and a negative or overflowing `jni_scanner_heap_max_wait_ms` makes `_poll()` admit waiters immediately or after a wrapped deadline. Require a finite ratio in the intended range and a non-negative wait bounded before nanosecond conversion, then cover invalid dynamic updates. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
