github-actions[bot] commented on code in PR #66913:
URL: https://github.com/apache/doris/pull/66913#discussion_r3830201124
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/StatementContext.java:
##########
@@ -201,6 +201,11 @@ public enum TableFrom {
// table locks
private final Stack<CloseableResource> plannerResources = new Stack<>();
+ // Resources that must outlive planning and remain valid until the
statement itself finishes.
+ // Keep these separate from plannerResources: NereidsPlanner releases
planner resources as soon as
+ // physical planning completes, while external split planning can still
use statement-scoped objects.
+ private final Map<Object, CloseableResource> statementResources = new
LinkedHashMap<>();
Review Comment:
[P1] Close streaming-insert resource generations
Unlike ordinary `InsertTask`, `StreamingInsertTask` is run directly by
`StreamingTaskScheduler`, so `TaskProcessor.closeTaskContext()` never owns this
context. Every attempt installs a fresh worker-local `StatementContext`, but
`AbstractStreamingTask` eventually reaches
`StreamingInsertTask.closeOrReleaseResources()`, which only nulls its fields;
retries overwrite the thread-local with another context. Streaming jobs require
exactly one TVF but may still join another relation, and the S3 offset rewrite
preserves that relation, so a TVF joined with Iceberg registers a
table-generation lease here that is never closed on success, retry, or
cancellation. Please close the exact per-attempt statement context and remove
or restore the worker context on every terminal path, with a TVF-plus-Iceberg
lifecycle 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]