mlbiscoc opened a new pull request, #2935:
URL: https://github.com/apache/solr/pull/2935

   https://issues.apache.org/jira/browse/SOLR-17519
   
   # Description
   
   In `BaseHttpClusterStateProvider` if all initially passed nodes except for 1 
go down, then CSP will only be aware of the 1 live node. If that node were to 
go down and any of the other initially passed nodes were to recover, CSP would 
not be able to connect to get latest cluster state of live nodes because it 
only holds the address of the now downed node.
   
   # Solution
   
   CSP holds immutable `initialNodes` and `knownNodes` which always have the 
latest set of live nodes but never removes initial set of live nodes to keep it 
resilient. Now if the case above were to occur, CSP would still be able to get 
cluster state and latest set of live nodes because known nodes is always aware 
of the initial set of live nodes.
   
   Known nodes can also hold new nodes that are added to the cluster after CSP 
initializion but those are removable unlike the initial nodes.
   
   # Tests
   
   `testClusterStateProviderDownedLiveNodes`  tests the above test case and 
used to fail.
   `testClusterStateProviderDownedKnownHosts` tests known nodes and asserts it 
always holds all initial sets of nodes even if nodes are down
   `testClusterStateProviderKnownHostsWithNewHost` tests known nodes with a 3rd 
added new host after CSP is initialized which is removable but initial nodes 
are always still present to be reachable by CSP.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [ ] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) 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](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 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](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to