924060929 commented on code in PR #69806:
URL: https://github.com/apache/doris/pull/69806#discussion_r4438378078


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/mvcc/PluginDrivenMvccExternalTable.java:
##########
@@ -345,18 +351,19 @@ private static List<PartitionValue> 
toPartitionValues(List<String> bound) {
      * Both an opted-in latest pin and explicit time travel must use their 
retained schema here.
      * Unparseable partitions remain logged and skipped so the snapshot can 
fall back to scan-all.
      */
-    private PluginDrivenPartitionView listPartitions(ConnectorMetadata 
metadata, ConnectorSession session,
+    private PluginDrivenPartitionView listPartitions(MetadataRead read, 
ConnectorMetadata metadata,
+            ConnectorSession session,
             ConnectorTableHandle handle, List<Column> partitionColumns) {
         List<Type> types = 
partitionColumns.stream().map(Column::getType).collect(Collectors.toList());
-        Optional<String> version = metadata.getPartitionViewVersion(session, 
handle);
+        Optional<String> version = read.execute(() -> 
metadata.getPartitionViewVersion(session, handle));
         if (version.isPresent()) {
             PluginDrivenPartitionView.Key key = 
PluginDrivenPartitionView.Key.versioned(
                     getId(), getDbName(), getName(), version.get(), types, 
false);
             return cachedPartitionView(key, k -> buildListPartitionView(

Review Comment:
   Fixed in 109131b84d62. Removed the two NoSuchTableException-to-empty-list 
catches before the common Iceberg listPartitions normalizer, allowing confirmed 
absence to reach the existing MVCC MetadataRead. Legitimate resolved-empty 
snapshots keep their early empty result; unrelated error behavior is unchanged. 
Native tests cover both derived-cache and uncached listing. FE controls cover a 
positive pinned UNPARTITIONED view with partition columns and a genuinely 
deferred native partition loader, including cleanup and delayed same-name 
recreation.
   
   Validation: 862 focused unit cases passed across 47 classes; FE build and 
Checkstyle passed. Controlled providers, not a live external-service 
integration run.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/plugin/PluginDrivenExternalTable.java:
##########
@@ -139,14 +154,63 @@ public Optional<ConnectorTableHandle> 
resolveConnectorTableHandle(
                 }
             }
         });
-        String dbName = db != null ? db.getRemoteName() : "";
-        Optional<ConnectorTableHandle> handle = 
metadata.getTableHandle(session, dbName, getRemoteName());
-        // A view has no table handle. Check live view existence before 
treating an empty handle as a
-        // dropped table; the cached isView flag can outlive a remote view 
deletion.
-        if (!handle.isPresent() && !metadata.viewExists(session, dbName, 
getRemoteName())) {
-            observation.ifPresent(Runnable::run);
+    }
+
+    /** A synthetic system relation repairs the shared source identity rather 
than its transient name. */
+    protected PluginDrivenExternalTable lookupRepairSource() {
+        return this;
+    }

Review Comment:
   Fixed in 109131b84d62. validateConnectorRowLevelDml captures MetadataRead 
before handle resolution and retains it through both metadata mode validation 
and the provider validator. Existing connector/provider TCCL scopes stay 
intact; no write/transaction behavior changes. Tests inject confirmed absence 
during validation and verify both cleanup and preservation of a replacement 
published while the old validation is blocked.
   
   Validation: 862 focused unit cases passed across 47 classes; FE build and 
Checkstyle passed. Controlled providers, not a live external-service 
integration run.



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