wenzhenghu commented on code in PR #68694:
URL: https://github.com/apache/doris/pull/68694#discussion_r4267292295


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java:
##########
@@ -219,6 +220,12 @@ public Plan planWithLock(LogicalPlan plan, 
PhysicalProperties requireProperties,
      */
     private Plan planWithLock(LogicalPlan plan, PhysicalProperties 
requireProperties,
             ExplainLevel explainLevel, boolean showPlanProcess, Consumer<Plan> 
lockCallback) {
+        return 
QueryLogContext.withPlanningContext(statementContext.getConnectContext().queryId(),
+                () -> planWithLockInternal(plan, requireProperties, 
explainLevel, showPlanProcess, lockCallback));
+    }
+
+    private Plan planWithLockInternal(LogicalPlan plan, PhysicalProperties 
requireProperties,

Review Comment:
   Agreed on the integration concern. The PRs remain independently buildable; I 
did not introduce a dependency on the planning-diagnostics implementation here. 
The intended landing order is query logging first, then planning diagnostics, 
with the second change adapting the shared planner/checker wrappers and reusing 
the shared query-log context where appropriate.
   
   The temporary integration branch used `withPlanningContext` outside 
`PlanningDiagnostics.plan`, preserved memo-log attribution, and passed 130 FE 
tests plus runtime query-log correlation. This validates the combination; it 
does not mean the standalone branches are now textually conflict-free. That 
landing adaptation remains explicit.



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1359,7 +1362,7 @@ private void handleQueryWithRetry(TUniqueId queryId) 
throws Exception {
                     // the plan would read nothing, or only what the failed 
attempt left, and succeed.
                     LOG.warn("not retrying query {} with the same plan: a scan 
node's ranges cannot be read"
                             + " again by the backend. stmt: {}",
-                            DebugUtil.printId(context.queryId()), 
parsedStmt.getOrigStmt().originStmt);
+                            QueryLogContext.queryIdSuffix(context.queryId()), 
parsedStmt.getOrigStmt().originStmt);

Review Comment:
   Fixed in 
[e8c944b9cb66](https://github.com/apache/doris/commit/e8c944b9cb668c580b1854979a0225a04d80ef76):
 the format is now `not retrying query{} with ...`, since the suffix already 
contains its leading space. This avoids the doubled space with both present and 
absent query identities.



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