github-actions[bot] commented on code in PR #65478:
URL: https://github.com/apache/doris/pull/65478#discussion_r3568437561


##########
be/src/common/config.cpp:
##########
@@ -1081,6 +1081,8 @@ DEFINE_mInt32(merged_hdfs_min_io_size, "8192");
 
 // OrcReader
 DEFINE_mInt32(orc_natural_read_size_mb, "8");
+DEFINE_Validator(orc_natural_read_size_mb,

Review Comment:
   This validator still does not make `orc_natural_read_size_mb=0` fail through 
`/api/update_config`. `DEFINE_Validator` registers a closure over the current 
global config value, but the runtime `UPDATE_FIELD` path calls that validator 
before assigning the parsed `new_value` (`old_value` is read at 2187, 
validation runs at 2188-2195, and `ref_conf_value = new_value` happens only at 
2197). A BE running with the default value can therefore accept and persist 
`orc_natural_read_size_mb=0`; subsequent ORC v2 scans now fail in 
`OrcReader::init()`, and once the global is invalid even a later valid runtime 
correction can be rejected because the validator still reads the old invalid 
value. A persisted 0 will also fail startup validation on restart. Please make 
runtime updates validate the candidate value before accepting/persisting it, 
and add a focused `set_config("orc_natural_read_size_mb", "0")` test.



-- 
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]

Reply via email to