-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-16995 Add a ReplicaCount to keep track of replicas per type #1928
Conversation
I think this can benefit from a JIRA issue? |
solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaCount.java
Outdated
Show resolved
Hide resolved
@janhoy You're right, I created one: https://issues.apache.org/jira/browse/SOLR-16995 |
Furthermore, PRs titles must start with a JIRA reference (assuming there is one); that's how they are linked. I'll change that now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 Love this!
solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementRequestImpl.java
Outdated
Show resolved
Hide resolved
solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaCount.java
Outdated
Show resolved
Hide resolved
c4d54ec
to
9818111
Compare
I split the changes related to using |
HdfsCloudIncrementalBackupTest has been flapping since 2022-08, and lately steadily increasing. |
https://issues.apache.org/jira/browse/SOLR-16995
Description
Working with replica counts, i.e., the number of replicas per replica type, is currently a bit painful, as the number of replicas is tracked individually for every replica type via individual variables. Solving this issue is also a step towards making it easier to add new replica types.
Solution
This PR introduces a
ReplicaCount
class (there was one up to Solr 8.x in the autoscaling framework, but it was removed in Solr 9) that is fancy wrapper around a Map<Replica.Type, Integer>.Tests
New tests for the
ReplicaCount
class. Existing tests ensure non-regression (there is no added feature).Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.