Skip to content

SOLR-18370: remove the ADDROLE/REMOVEROLE Overseer Roles API - #4772

Open
serhiy-bzhezytskyy wants to merge 2 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18370-remove-overseer-roles-api-fresh
Open

SOLR-18370: remove the ADDROLE/REMOVEROLE Overseer Roles API#4772
serhiy-bzhezytskyy wants to merge 2 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18370-remove-overseer-roles-api-fresh

Conversation

@serhiy-bzhezytskyy

@serhiy-bzhezytskyy serhiy-bzhezytskyy commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SOLR-18370

Removes the ADDROLE/REMOVEROLE Overseer Roles API. Replacement is Node Roles (-Dsolr.node.roles), already in place.

  • CollectionsHandler ADDROLE_OP/REMOVEROLE_OP, ClusterAPI's v2 add-role/remove-role, ClusterStatus.ROLES_PROP, CollectionAdminRequest.addRole/removeRole, the roles.json ZK node
  • Orphaned by the above, also removed: CollectionsHandler.KNOWN_ROLES, ClusterAPI.RoleInfo, CollectionAdminParams.ROLE -- 0 remaining refs anywhere
  • The internal "re-run prioritization" signal reused the ADDROLE enum value and an OverseerRoleCmd class only because they already existed. Renamed both (REPRIORITIZE_OVERSEER, OverseerPrioritizationCmd) rather than keep a role-shaped name that needed a paragraph to explain
  • RollingRestartTest deleted -- its one @Test was 100% ADDROLE-only. OverseerRolesTest's two ADDROLE tests replaced with one test of the actual invariant: a preferred node takes over without waiting for the current Overseer to restart
  • Ref-guide: dropped the ADDROLE/REMOVEROLE sections from cluster-node-management.adoc (incl. a stale roles field in the CLUSTERSTATUS example), added major-changes-in-solr-11.adoc

33 tests, 0 failures. Merge-simulated against all 4 open PRs sharing a file with this one (#4767/#4768/#4769/#4770) together -- applies clean.

AI-assisted (Claude Sonnet 5)

Removes CollectionsHandler's ADDROLE_OP/REMOVEROLE_OP, ClusterAPI's v2
add-role/remove-role commands, ClusterStatus.ROLES_PROP, CollectionAdminRequest.
addRole/removeRole, and the roles.json ZK node. Replacement is Node Roles
(-Dsolr.node.roles), already in place.

The internal re-prioritization signal (a node starting as overseer:preferred
nudges the Overseer) reused the ADDROLE enum value and an OverseerRoleCmd class
purely because they already existed. Renamed both (REPRIORITIZE_OVERSEER,
OverseerPrioritizationCmd) instead of keeping a role-shaped name that needed a
paragraph to explain.

Orphaned by the removal, also deleted: CollectionsHandler.KNOWN_ROLES,
ClusterAPI.RoleInfo, CollectionAdminParams.ROLE (0 remaining refs anywhere,
confirmed each with a fresh grep after the previous deletion).

Two ADDROLE-only tests replaced with one test of the actual invariant (a
preferred node takes over without waiting for the current Overseer to
restart); RollingRestartTest deleted wholesale (its single @test was 100%
ADDROLE-dependent). Ref-guide updated to match: removed the ADDROLE/REMOVEROLE
sections from cluster-node-management.adoc (including a stale roles response
field in the CLUSTERSTATUS example), added major-changes-in-solr-11.adoc.

AI-assisted (Claude Sonnet 5)
@github-actions github-actions Bot added documentation Improvements or additions to documentation client:solrj tests cat:cloud cat:api labels Aug 19, 2026
CI's validateLogCalls caught it: switching the ADDROLE-era log.warn to
log.info left props.jsonStr() unguarded, an expensive call that would now
run even when INFO logging is disabled. Wrapped in isInfoEnabled(),
matching the pattern already used elsewhere in this file.

AI-assisted (Claude Sonnet 5)
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.cloud.api.collections;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me some context on why we had to add this whole class? This looks like a big add, is it because something was missed when we moved to the node roles earlier?

@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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess this is a bug fix?

@epugh

epugh commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@HoustonPutman @dsmiley there is some additional code in this that maybe would be of interest to you to review, it's not just a stright removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:api cat:cloud client:solrj documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants