serhiy-bzhezytskyy commented on code in PR #4772:
URL: https://github.com/apache/solr/pull/4772#discussion_r3835078372


##########
solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerPrioritizationCmd.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.cloud.api.collections;

Review Comment:
   Not a big add -- it's a smaller replacement for the deleted 
`OverseerRoleCmd` (64 lines vs. 128), not new functionality. The internal 
re-prioritization nudge (a node starting as `overseer:preferred` pokes the 
Overseer to re-run prioritization) was already there -- it just piggybacked on 
the `ADDROLE` enum value and `OverseerRoleCmd` class purely because they 
already existed, since ADDROLE/REMOVEROLE were the only overseer-related 
messages at the time. Now that those are gone, the nudge needed an honest name 
of its own instead of a role-shaped one that needed a paragraph to explain -- 
hence `REPRIORITIZE_OVERSEER`/`OverseerPrioritizationCmd`, stripped of the 
roles.json persistence logic that went away with ADDROLE/REMOVEROLE.
   
   AI-assisted (Claude Sonnet 5)



##########
solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java:
##########
@@ -42,7 +41,12 @@ public class OverseerRolesTest extends SolrCloudTestCase {
 
   @BeforeClass
   public static void setupCluster() throws Exception {
-    configureCluster(4).addConfig("conf", 
configset("cloud-minimal")).configure();
+    // SolrCloudTestCase randomises solr.cloud.overseer.enabled; this test is 
about the Overseer

Review Comment:
   Yes -- `SolrCloudTestCase` randomizes `solr.cloud.overseer.enabled` across 
runs, and the old `testOverseerRole()` silently no-op'd (early return) whenever 
a run landed on distributed-Collection-API mode. Since this test is 
specifically about Overseer election, `.withOverseer(true)` pins it so it 
actually exercises the behavior every run instead of ~50% of the time.
   
   AI-assisted (Claude Sonnet 5)



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