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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/load/NereidsStreamLoadPlanner.java:
##########
@@ -342,4 +342,11 @@ public TPipelineFragmentParams plan(TUniqueId loadId, int 
fragmentInstanceIdInde
         params.setEnableTso(destTable.enableTso());
         return params;
     }
+
+    static TQueryOptions getQueryOptions(NereidsLoadTaskInfo taskInfo) {
+        if (taskInfo instanceof NereidsRoutineLoadTaskInfo) {

Review Comment:
   [P2] Keep multi-table Routine Load on the asynchronous defaults
   
   This `instanceof` excludes only the single-table routine representation. 
`streamLoadMultiTablePut()` still creates a `NereidsStreamLoadTask` and 
overlays its persisted `RoutineLoadJob` via `setMultiTableBaseTaskInfo()`, so 
it falls through and copies the FE's current global snapshot. Changing 
`enable_hyperscan_fallback` globally can therefore change or fail later tasks 
of an existing multi-table routine job, while the equivalent single-table job 
keeps the intended fresh `TQueryOptions` default. Please make asynchronous task 
provenance explicit and cover both routine representations in the 
exclusion/test.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/load/NereidsStreamLoadPlanner.java:
##########
@@ -342,4 +342,11 @@ public TPipelineFragmentParams plan(TUniqueId loadId, int 
fragmentInstanceIdInde
         params.setEnableTso(destTable.enableTso());
         return params;
     }
+
+    static TQueryOptions getQueryOptions(NereidsLoadTaskInfo taskInfo) {
+        if (taskInfo instanceof NereidsRoutineLoadTaskInfo) {
+            return new TQueryOptions();
+        }
+        return ConnectContext.get().getSessionVariable().toThrift();

Review Comment:
   [P1] Copy only the intended policy into Stream Load options
   
   This copies every globally settable session option into an RPC Stream Load, 
although this planner previously started from a fresh `TQueryOptions`. For 
example, `StreamLoadHandler` creates its request context from the global 
session defaults, `toThrift()` carries `dry_run_query=true`, and both 
tablet-writer `write()` implementations then return OK without writing any 
input block. A normal HTTP Stream Load can therefore report success while 
ingesting no rows after that unrelated global is enabled; 
`truncate_char_or_varchar_columns` similarly starts mutating load data before 
strict validation. Please keep fresh load options and copy only 
`enable_hyperscan_fallback` from the request snapshot for genuinely synchronous 
tasks, with a test proving unrelated globals stay at their load defaults.



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