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


##########
be/src/format_v2/orc/orc_reader.cpp:
##########
@@ -870,8 +823,15 @@ Status OrcReader::init(RuntimeState* state) {
     options.setMemoryPool(*ExecEnv::GetInstance()->orc_memory_pool());
     options.setReaderMetrics(&_state->reader_metrics);
 
-    auto input_stream = 
std::make_unique<DorisOrcInputStream>(_file_description->path,
-                                                              
_tracing_file_reader, _io_ctx.get());
+    OrcFileInputStreamOptions input_stream_options;
+    input_stream_options.natural_read_size = config::orc_natural_read_size_mb 
<< 20;

Review Comment:
   This makes ORC v2 depend on a mutable BE config value that is not validated 
before it reaches the new constructor check. `orc_natural_read_size_mb` is 
declared with `DEFINE_mInt32`, so `/api/update_config` can accept 
`orc_natural_read_size_mb=0`, and this line then derives `natural_read_size = 
0`; immediately after that, `OrcFileInputStream` aborts on 
`DORIS_CHECK_GT(_options.natural_read_size, 0)` during reader initialization. 
That turns an accepted runtime config into a BE process crash for any ORC v2 
scan. Please add a validator for a safe positive range, and compute the byte 
value after validation with a safe cast, or reject/report the invalid value 
before constructing the input stream.
   



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