github-actions[bot] commented on code in PR #67186:
URL: https://github.com/apache/doris/pull/67186#discussion_r3895540563
##########
fe/fe-connector/fe-connector-hms/src/main/java/org/apache/doris/connector/hms/ThriftHmsClient.java:
##########
@@ -240,13 +242,69 @@ static short toThriftMaxParts(int maxParts) {
@Override
public List<HmsPartitionInfo> getPartitions(String dbName,
String tableName, List<String> partNames) {
- return execute(client -> {
- List<Partition> partitions =
- client.getPartitionsByNames(dbName, tableName, partNames);
- return partitions.stream()
- .map(ThriftHmsClient::convertPartition)
- .collect(Collectors.toList());
- });
+ return getPartitionsWithStats(dbName, tableName,
partNames).getPartitions();
+ }
+
+ @Override
+ public List<HmsPartitionInfo> getExistingPartitions(
+ String dbName, String tableName, List<String> partNames) {
+ return getExistingPartitionsWithStats(dbName, tableName,
partNames).getPartitions();
+ }
+
+ @Override
+ public HmsPartitionBatchResult getExistingPartitionsWithStats(
+ String dbName, String tableName, List<String> partNames) {
+ HmsPartitionRequest request = partitionRequest(dbName, tableName,
partNames);
+ if (clientPool != null) {
+ return
newPartitionBatchExecutor(this::getPartitionsByNames).executeExistingWithStats(request);
+ }
+ try (UnpooledPartitionTransport transport = new
UnpooledPartitionTransport()) {
Review Comment:
**[P2] Preserve completed stats when the final unpooled close fails.** In
pool-size-zero mode this return is not complete until try-with-resources calls
`UnpooledPartitionTransport.close()`. If every batch RPC succeeds but
`IMetaStoreClient.close()` throws, the completed `HmsPartitionBatchResult` is
discarded and a raw runtime exception escapes outside the executor, so
`HiveScanPlanProvider` cannot record the RPC/item/fallback stats. This is
distinct from the existing remote-failure cleanup thread because there is no
remote primary here. Capture the result, convert a close-only failure to
`HmsClientException` carrying its stats, and add
all-RPCs-succeed/final-close-fails coverage for both unpooled APIs and the
profile path.
--
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]