re20052 commented on code in PR #68042:
URL: https://github.com/apache/doris/pull/68042#discussion_r4226758196


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/doris/RemoteDorisExternalTable.java:
##########
@@ -62,62 +62,58 @@ protected synchronized void makeSureInitialized() {
     }
 
     private RemoteOlapTable getDorisOlapTable() {
-        if (!isSyncOlapTable) {
-            synchronized (this) {
-                if (!isSyncOlapTable) {
-                    try {
-                        isSyncOlapTable = true;
-                        remoteOlapTable = null;
-                        lastException = null; // clear previous exception
-
-                        List<Partition> cachedPartitions = 
Lists.newArrayList(partitions);
-                        List<Partition> cachedTempPartitions = 
Lists.newArrayList(tempPartitions);
-                        RemoteOlapTable olapTable = 
((RemoteDorisExternalCatalog) catalog).getFeServiceClient()
-                                .getOlapTable(dbName, remoteName, tableId, 
cachedPartitions, cachedTempPartitions);
-                        olapTable.setCatalog((RemoteDorisExternalCatalog) 
catalog);
-                        olapTable.setDatabase((RemoteDorisExternalDatabase) 
db);
-
-                        // Remove redundant nested synchronized block
-                        tableId = olapTable.getId();
-                        partitions = 
Lists.newArrayList(olapTable.getPartitions());
-                        tempPartitions = 
Lists.newArrayList(olapTable.getTempPartitions().getPartitions());

Review Comment:
   Addressed in the latest head.
   
   A refresh closes admission before its RPC starts. Later callers share a 
successor task, which runs only after the predecessor completes. 
`FutureTask.run()` guarantees single execution, so an interrupted waiter cannot 
orphan the successor.
   
   Latch-based tests cover the V-to-V+1 successor schedule and waiter 
interruption.



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