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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/MetastoreEventSyncDriver.java:
##########
@@ -205,7 +215,10 @@ private void syncCatalog(PluginDrivenExternalCatalog 
catalog, ConnectorEventSour
         // Apply in order; on failure the exception propagates and realRun's 
catch resets the cursor to -1
         // (self-heal), so the edit-log cursor below is NOT written (followers 
do not jump past a failed apply)
         // and the next cycle first-pulls a clean full refresh instead of 
retrying the poison descriptor.
-        applyDescriptors(catalog, descriptors);
+        onPluginClassLoader(connector.getClass().getClassLoader(), () -> {

Review Comment:
   **[P1] Fence event batches against connector replacement**
   
   `connector` and `eventSource` are captured before `pollOnce()`, but `ALTER 
CATALOG` can close C1 and rebuild C2 without synchronizing with this cycle. 
Lines 218-222 can then invalidate the closed C1 while catalog mutators resolve 
through C2, and finally commit the cursor obtained from C1. Hive does not 
reliably fail here: `close()` nulls `hmsClient`, while the old instance's final 
caches remain callable, so self-heal need not run. If ALTER changed the 
metastore endpoint, old-source descriptors are applied to the rebuilt catalog 
and an incompatible cursor is retained under the same catalog ID. Please fence 
poll/apply/commit (including full-refresh and empty-result commits) with a 
connector lifecycle epoch or lease, force a reset/full refresh on mismatch, and 
add a deterministic replacement-after-poll regression.



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