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


##########
be/src/service/internal_service.cpp:
##########
@@ -1384,6 +1385,12 @@ void 
PInternalService::report_stream_load_status(google::protobuf::RpcController
     st.to_protobuf(response->mutable_status());
 }
 
+int PInternalService::kafka_meta_timeout_ms(const PProxyRequest& request) {
+    // Preserve the optional i64 seconds until the Kafka client's i32 
millisecond boundary.
+    // For example, 2147484 seconds must become INT_MAX, not a negative 
timeout.

Review Comment:
   [P1] Preserve the 60-second default for omitted Kafka metadata timeouts. 
`timeout_ms_for_int32` takes seconds, but this fallback passes `60`, so an 
unset `timeout_secs` now becomes 60 ms; the previous code used `60 * 1000`, and 
the added boundary test expects 60000. Routine-load/Kafka metadata requests 
that omit the optional field can therefore expire on normal network latency. 
Pass a seconds-aware 60-second default or use 60000 ms explicitly.



##########
be/src/load/routine_load/routine_load_task_executor.cpp:
##########
@@ -296,6 +296,11 @@ Status RoutineLoadTaskExecutor::submit_task(const 
TRoutineLoadTask& task) {
     ctx->auth.token = _exec_env->cluster_info()->curr_auth_token;
 
     if (task.__isset.max_interval_s) {
+        // Consumers track elapsed milliseconds. Reject intervals that cannot 
fit that clock.
+        if (task.max_interval_s < 0 || task.max_interval_s > INT64_MAX / 1000) 
{

Review Comment:
   [P1] Reject zero routine-load intervals before scheduling. This guard 
rejects negative and oversized values but accepts `max_interval_s == 0`; the 
task copies zero into its context, then `DataConsumerGroup::_run_consume_loop` 
exits on `left_time <= 0` before consuming any records. FE CREATE/ALTER 
requires `max_batch_interval >= 1`, so reject `<= 0` (or normalize it to a 
documented positive default) at this BE boundary.



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