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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/ShortCircuitQueryContext.java:
##########
@@ -115,6 +116,7 @@ public ShortCircuitQueryContext(Planner planner, Queriable 
analzyedQuery) throws
         this.tbl = this.scanNode.getOlapTable();
         this.tableName = this.scanNode.getTableNameInPlan();
         this.schemaVersion = this.tbl.getBaseSchemaVersion();
+        this.partitionTopologyVersion = this.tbl.getPartitionTopologyVersion();

Review Comment:
   **[P1] Bind the topology generation to the pruner snapshot**
   
   This samples the generation whenever a `ShortCircuitQueryContext` is 
constructed, but the first prepared execution constructs two contexts around 
the same planner scan. A concrete interleaving is: the temporary context in 
`StmtExecutor` executes and `lazyEvaluateRangeLocations()` builds the old range 
map; that execution returns; another connection commits `ADD PARTITION`; then 
`ExecuteCommand` constructs the persistent context from the same 
planner/`OlapScanNode`, so this line stamps the stale, recently populated 
pruner with the new generation. The next execution passes `isReusable()`, 
`update()` observes its ten-second throttle, and the newly matching row is 
still missed. No table lock spans execution completion and cache publication. 
Please cache the exact context/generation used to build the pruner (or record 
and compare the pruner's own topology generation) and add a latch-based test 
for DDL between lazy pruning and context publication.



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