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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java:
##########
@@ -1199,6 +1204,18 @@ public void setQueryId(TUniqueId queryId) {
         }
     }
 
+    /** Resolve each resource once for the current query without retaining it 
in prepared expressions. */
+    public TS3Resource getOrRegisterS3Resource(String resourceName) {
+        return s3Resources.computeIfAbsent(resourceName,

Review Comment:
   [P2] Reset S3 snapshots before each routine-load task plan
   
   `RoutineLoadJob.plan()` calls `setComputeGroup()` in shared-nothing mode, 
leaving a `ConnectContext` installed on the long-lived 
`RoutineLoadTaskScheduler` thread; neither this path nor the scheduler calls 
`setStartTime()`/`resetConnection()`. A routine load with `COLUMNS(id, uri, 
n=ELEMENT_AT(TO_FILE('r',uri),'size'))` therefore caches `r` on its first task, 
and this `computeIfAbsent` keeps returning that snapshot for every fresh 
Kafka/Kinesis task plan. After `ALTER RESOURCE` rotates `r` and the old key is 
revoked, subsequent tasks still send the old credentials through 
`NereidsStreamLoadPlanner` and fail. Refresh the resource map at each 
background load planning boundary and cover rotation between two tasks. This is 
separate from the existing prepared group-commit finding: no cached fragment 
plan is reused here.



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