Skip to content

SOLR-17550: preferred Overseer might not work#4175

Open
r4mercur wants to merge 4 commits intoapache:mainfrom
r4mercur:SOLR-17550
Open

SOLR-17550: preferred Overseer might not work#4175
r4mercur wants to merge 4 commits intoapache:mainfrom
r4mercur:SOLR-17550

Conversation

@r4mercur
Copy link

@r4mercur r4mercur commented Mar 1, 2026

add testcase to identify wrong method behaviour of setPreferredOverseer() in ZkController

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

Description

Like described in the ticket from the reporter: "By code inspection, ZkController.setPreferredOverseer creates a command message improperly. The key "node" should exist with the node name as value but instead the key is itself the node name – a bug introduced by a refactoring in 2022.
Ideally we understand the ramifications; like shouldn't this be found by a test?"

I only added the test case currently, not sure if the bug should also be fixed by using "node" as static string as key ?

Solution

My approach is a new unittest-case to identify the wrong behaviour of the setter method in the ZkController. I used the LLM "Claude Sonet 4.5" for problem description and solution proposals.

Tests

The new unittest-case written should identify problems, when using "getNodeName()" to set the key of the properties.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

add testcase to identify wrong method behaviour of setPreferredOverseer() in ZkController
@r4mercur r4mercur marked this pull request as draft March 1, 2026 18:19
r4mercur added 3 commits March 1, 2026 19:21
fix import after ./gradlew check & ./gradlew tidy
fix import after ./gradlew check & ./gradlew tidy & change test
@r4mercur r4mercur marked this pull request as ready for review March 1, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant