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


##########
fe/fe-connector/fe-connector-hms/src/main/java/org/apache/doris/connector/hms/ThriftHmsClient.java:
##########
@@ -240,13 +242,77 @@ 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()

Review Comment:
   **[P2] Preserve the closed-client guard for empty partition requests.** 
`getPartitionsWithStats` and `getExistingPartitionsWithStats` build the request 
before any `closed` check, while `HmsPartitionBatchExecutor` returns 
immediately for an empty request (lines 57-65), so after 
`ThriftHmsClient.close()` an empty `getPartitions`/`getExistingPartitions` call 
silently succeeds. The old `getPartitions` path entered `execute`, which 
rejected closed clients up front; this now lets a close/query race look like a 
valid empty scan. Check `closed` at the start of both public batch methods (and 
add pooled/unpooled post-close empty-request coverage) to preserve the client 
lifecycle contract.



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