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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/scan/FederationBackendPolicy.java:
##########
@@ -177,31 +177,26 @@ public void init() throws UserException {
     }
 
     public void init(List<String> preLocations) throws UserException {
+        init(queryBackendPolicy(preLocations));
+    }
+
+    public static List<Backend> getQueryAvailableBackends() throws 
UserException {
+        return 
queryBackendPolicy(Collections.emptyList()).getCandidateBackends(queryComputeGroup().getBackendList());

Review Comment:
   [P2] Reuse the selected scan backends for encrypted-read admission
   
   This fixes the earlier availability-filter issue. One case remains when 
`prefer_compute_node_for_external_table=true` and 
`min_backend_num_for_external_table=2`. Suppose the group has one compute node 
and two mixed nodes, and one mixed node has lost its encryption capability. 
`getCandidateBackends()` shuffles the list and picks one mixed node to fill the 
second slot. Admission calls it here, then scan initialization calls it again. 
Admission can pass with the capable node and dispatch can reject the 
independently selected node. Admission can also reject a scan whose selected 
nodes are both capable.
   
   I exercised the FE admission and scheduler methods in pairs on this commit 
with those three nodes held fixed. In 200 pairs, 55 passed admission but 
selected an incapable node for the scan, and 54 failed admission while the scan 
selected only capable nodes.
   
   Could admission validate the same candidate list that the scan will use, 
while keeping the send-time capability recheck? A regression test with a 
controlled selection order could cover this without relying on random outcomes.



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