Doris-Breakwater commented on issue #71185:
URL: https://github.com/apache/doris/issues/71185#issuecomment-7297776058

   The cached Hive scan path in public Apache Doris 4.1.3 lost bulk partition 
loading. Apache Doris 4.1.5 includes the 4.1 backport that restores batching 
for this path. Please retest on 4.1.5 before opening a new PR for the same 
behavior. [Backport #68197](https://github.com/apache/doris/pull/68197), [4.1.5 
release](https://github.com/apache/doris/releases/tag/4.1.5-release).
   
   - In 2.1.11 (`97b77e6cda`), `HiveMetaStoreCache` uses 
`partitionCache.getAll()`. Its bulk loader sends the missed partition names 
through one `getPartitionsByNames` call for a Thrift HMS catalog. In public 
4.1.3 and 4.1.3-rc02 (both `7126cf65d96`), `HiveScanNode` calls 
`HiveExternalMetaCache.getAllPartitionsWithCache()`, which walks the selected 
keys sequentially. Each miss that needs loading invokes the scalar 
`getPartition` loader. The bulk helper is used by the explicit cache-bypass 
path. The diff in #60937 shows the switch to per-key lookup. Its description 
gives the framework rationale, and maintainer intent around the loss of 
batching remains unconfirmed. [2.1.11 
cache](https://github.com/apache/doris/blob/97b77e6cda6743e2bb4fcc6af45c613f12310461/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java#L526-L549),
 [4.1.3 
cache](https://github.com/apache/doris/blob/7126cf65d96ebc43fce0906f51e92c1a2ccf24a6/fe/fe-core/src/main/java/org/apache/doris/data
 source/hive/HiveExternalMetaCache.java#L527-L553), [refactor 
diff](https://github.com/apache/doris/pull/60937/files).
   - In 4.1.5, the scan path serves cache hits, collects misses into a single 
logical lookup, caches the returned objects, and builds the result in input 
order. The Thrift client splits the lookup into bounded `getPartitionsByNames` 
calls. The cache path retains a per-key fallback when a partition was dropped 
during the lookup. This should reduce HMS round trips on a cold scan with 
multiple misses. [4.1.5 
cache](https://github.com/apache/doris/blob/917b20be83878e98f94e3ebf7efccc80346e3e50/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveExternalMetaCache.java#L650-L686),
 [Thrift 
batching](https://github.com/apache/doris/blob/917b20be83878e98f94e3ebf7efccc80346e3e50/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/ThriftHMSCachedClient.java#L383-L389).
   
   The reported 810 ms versus 31 ms is consistent with the source change. `Get 
Partitions Time` measures elapsed time from the start of split planning through 
partition retrieval, so it cannot establish RPC counts or per-call latency. The 
reported `eaaab213c84` also differs from the public tag commit. Please confirm 
the exact FE build and share the redacted profiles, total and selected 
partition counts, HMS type and version, and how the FE cache was made cold. For 
the same query on 4.1.5, a cold run and immediate warm rerun on the same FE 
would help. If the gap persists, HMS method counts and durations for the 
matching query window would show whether the scan is still issuing scalar 
requests or spending time elsewhere. [4.1.3 timing 
code](https://github.com/apache/doris/blob/7126cf65d96ebc43fce0906f51e92c1a2ccf24a6/fe/fe-core/src/main/java/org/apache/doris/common/profile/SummaryProfile.java#L505-L510).
   
   Breakwater-GitHub-Analysis-Slot: slot_a4777b0ad109
   


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