>From Michael Blow <[email protected]>:

Michael Blow has submitted this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21354?usp=email )

Change subject: [NO ISSUE][*DB][TEST] Enable resetting active nc query endpoints
......................................................................

[NO ISSUE][*DB][TEST] Enable resetting active nc query endpoints

Change-Id: I10695afab1f2fb93a03ebece3bd1e44109eadf99
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21354
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Hussain Towaileb <[email protected]>
Tested-by: Jenkins <[email protected]>
---
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
1 file changed, 14 insertions(+), 0 deletions(-)

Approvals:
  Hussain Towaileb: Looks good to me, approved
  Jenkins: Verified; Verified




diff --git 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
index 6f680d5..48e1691 100644
--- 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
+++ 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
@@ -179,6 +179,7 @@
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.http.server.utils.HttpUtil;
 import org.apache.hyracks.util.StorageUtil;
+import org.apache.hyracks.util.annotations.AiProvenance;
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -324,6 +325,19 @@
         ncEndPointsList.addAll(ncEndPoints.values());
     }

+    /**
+     * Replaces the NC query-endpoint pool used to round-robin {@code 
QUERY_SERVICE}/UDF requests (see
+     * {@link #createEndpointURI}) with the supplied set. {@link 
#setNcEndPoints} eagerly seeds this list with the full
+     * configured topology; callers that know which nodes are actually live 
(e.g. the cluster test framework after a
+     * topology change) must narrow it down to those, otherwise a request can 
be dispatched to a defined-but-never-started
+     * node.
+     */
+    @AiProvenance(agent = AiProvenance.Agent.CLAUDE_OPUS_4_8, tool = 
AiProvenance.Tool.CLAUDE_UI)
+    public static void setActiveNcQueryEndPoints(Collection<InetSocketAddress> 
activeEndPoints) {
+        ncEndPointsList.clear();
+        ncEndPointsList.addAll(activeEndPoints);
+    }
+
     public void setNcReplicationAddress(Map<String, InetSocketAddress> 
replicationAddress) {
         this.replicationAddress = replicationAddress;
     }

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21354?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I10695afab1f2fb93a03ebece3bd1e44109eadf99
Gerrit-Change-Number: 21354
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Hussain Towaileb <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>

Reply via email to