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


##########
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:
   Confirmed: the previous change reused the criteria but independently sampled 
the candidate subset. That is insufficient when compute-node filling selects 
only some mixed nodes.
   
   Fixed in 378e10f32d79. Default scan initialization and native admission now 
reuse one immutable membership list per statement planning attempt and 
compute-group identity through the existing planning-only statement scope. This 
works in either invocation order and for multiple scans. The scope discards the 
list at planning completion/reset; it is not a global cache. Preferred-location 
and explicitly supplied policies keep their separate paths. This also makes 
plaintext default scans in the same statement/group share membership, while 
their split assignment and weights stay per scan.
   
   Only membership is memoized. Capability is checked against the current 
backend state on every admission check, and the capability checks before 
serialization and registered bound-recipient/address/capability checks 
immediately before sending remain in place. A later capability loss still 
refuses the operation.
   
   The four final controlled-order cases fail against isolated baseline 
production classes at 75e66f8da6ad (different selected IDs or opposite 
admission booleans) and pass after the fix. They cover 
admission-first/scan-first and capable/incapable-first selections, another 
scan, capability revocation, a new statement, preferred-location isolation, a 
different group and planning reset. The fresh official FE runner passed 171 
tests across 11 suites with zero failures/errors/skips. FE Checkstyle and 
clang-format 16.0.6 for all seven existing PR C++ files pass. Native encrypted 
SQL was not freshly rerun.



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