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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java:
##########
@@ -710,12 +733,20 @@ public Partition getPartition(List<String> 
partitionValues) {
         return client.getPartition(getRemoteDbName(), remoteName, 
partitionValues);
     }
 
+    public List<String> listPartitionNames() {
+        return withMissingTableRepair(() -> ((HMSExternalCatalog) 
catalog).getClient()

Review Comment:
   [P2] Guard the partition-values load used during HMS query binding
   
   Regular query binding bypasses these new listing wrappers: 
`LogicalFileScan.initialSelectedPartitions()` -> 
`ExternalTable.initSelectedPartitions()` -> 
`HMSExternalTable.getNameToPartitionItems()` -> `getHivePartitionValues()` -> 
`HiveExternalMetaCache.getPartitionValues()` -> `loadPartitionValues()`. The 
last method still calls `client.listPartitionNames()` directly, after the 
schema/partition-column guards have returned.
   
   Set `meta.cache.hive.partition_values.ttl-second=0`, warm `SHOW TABLES` and 
`DESC` for a partitioned Hive table with normal schema caching, drop it 
externally, then run `EXPLAIN SELECT * FROM t`. The warm object/schema and 
plain-Hive empty snapshot let binding reach that live partition-list RPC. Hive 
3.1.3 [checks the base table and reports 
`NoSuchObjectException`](https://github.com/apache/hive/blob/rel/release-3.1.3/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L4160-L4168),
 but no repair boundary surrounds this load, so the query fails while `SHOW 
TABLES` still lists `t`. Guard the resolved table's live partition-values read 
and add a warm-schema binding test. This is a separate cache-loader instance 
from the existing SHOW PARTITIONS command thread; its command-only fix/tests 
never enter this path.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonExternalTable.java:
##########
@@ -403,12 +407,17 @@ public boolean isPartitionColumnAllowNull() {
 
     @Override
     public MvccSnapshot loadSnapshot(Optional<TableSnapshot> tableSnapshot, 
Optional<TableScanParams> scanParams) {
-        return new 
PaimonMvccSnapshot(getPaimonSnapshotCacheValue(tableSnapshot, scanParams));
+        return withMissingTableRepair(() -> {

Review Comment:
   [P2] Guard direct Paimon partition snapshot reads
   
   This wrapper does not cover `SHOW PARTITIONS`: after `analyze()` 
successfully calls the guarded `isPartitionedTable()`, its handler calls 
`getPartitionSnapshot(Optional.empty())` directly. That reaches 
`getOrFetchSnapshotCacheValue()` -> `PaimonUtils.getSnapshotCacheValue()` -> 
`PaimonExternalMetaCache.getSnapshotCache()` -> `tables.get()`, bypassing both 
`loadSnapshot()` and `getBasePaimonTable()`.
   
   With `meta.cache.paimon.table.ttl-second=0`, warm `SHOW TABLES` and `DESC` 
for a partitioned filesystem Paimon table, then drop it externally between 
command validation and this snapshot read. The second SDK load reports the 
main-table `TableNotExistException` ([Paimon 1.4.2 
loader](https://github.com/apache/paimon/blob/release-1.4.2/paimon-core/src/main/java/org/apache/paimon/catalog/FileSystemCatalog.java#L103-L106)),
 but no repair boundary remains active, so the command fails while subsequent 
`SHOW TABLES` still lists the dropped table. Guard the live snapshot fallback 
and add a command test that fails only after successful validation. This is 
separate from the fixed HMS listing and Paimon OPTIONS/status paths.



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