Baymine opened a new issue, #65886:
URL: https://github.com/apache/doris/issues/65886

   ### Description
   
   `CacheAnalyzer.buildCacheTableForOlapScanNode` iterates over the 
`selectedPartitionIds` of an `OlapScanNode` and calls 
`olapTable.getPartition(partitionId)` for each id. If a partition is dropped 
between query planning and the cache-build phase (e.g. a concurrent `DROP 
PARTITION`), `getPartition` returns `null`, and the subsequent 
`partition.getVisibleVersionTime()` throws a `NullPointerException`, aborting 
the cache update for that query.
   
   ### How to reproduce
   
   1. Enable SQL cache.
   2. Run a query against a partitioned olap table so its result is cached.
   3. Concurrently drop one of the selected partitions and re-run the query (or 
trigger the cache update path) before the planner's partition snapshot is 
refreshed.
   
   ### Expected behavior
   
   The cache build skips the dropped partition and completes for the remaining 
partitions (no crash).
   
   ### Actual behavior
   
   A `NullPointerException` is thrown from `buildCacheTableForOlapScanNode`, 
the cache is not updated, and the error surfaces in the FE log.
   


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