Skip to content
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

Ignore clusterstate.json. Fixes #224. #315

Closed
wants to merge 2 commits into from
Closed

Ignore clusterstate.json. Fixes #224. #315

wants to merge 2 commits into from

Conversation

rokclimb15
Copy link

Remove clusterstate.json and listener since the node exists but Solr no longer updates it. This resulted in the collections property being overwritten with an empty state. Tested on Solr 7.7.2. Below is log output during a connection/index/search routine. Without clusterstate being watched the ZooKeeper class correctly connects to live_nodes, polls collections, and polls the collection state to get shards.

Updated live nodes: ['172.31.80.126:8983_solr', '172.31.85.226:8983_solr', '172.31.84.9:8983_solr', '172.31.87.69:8983_solr']
Updated aliases: None
Updated collection: ['staging']
Updated collections: {'staging': {'pullReplicas': '0', 'replicationFactor': '2', 'router': {'name': 'compositeId'}, 'maxShardsPerNode': '1', 'autoAddReplicas': 'false', 'nrtReplicas': '2', 'tlogReplicas': '0', 'shards': {'shard1': {'range': '80000000-7fffffff', 'state': 'active', 'replicas': {'core_node3': {'core': 'staging_shard1_replica_n1', 'base_url': 'http://172.31.85.226:8983/solr', 'node_name': '172.31.85.226:8983_solr', 'state': 'recovery_failed', 'type': 'NRT', 'force_set_state': 'false'}, 'core_node4': {'core': 'staging_shard1_replica_n2', 'base_url': 'http://172.31.80.126:8983/solr', 'node_name': '172.31.80.126:8983_solr', 'state': 'active', 'type': 'NRT', 'force_set_state': 'false', 'leader': 'true'}}}}}}

I attempted to run the test suite, but it looks like the Solr package referenced is 404 in the test script. Additionally, Solr 4 is unsupported at this point I think.

@acdha
Copy link
Collaborator

acdha commented Mar 22, 2020

Is there any upstream documentation about this being deprecated? We should probably have some sort of documentation / release notes link since I'm assuming there's at least some older version of Solr someone is running where this still works.

@rokclimb15
Copy link
Author

I wasn't able to find any official documentation, likely because this is the internal API of Solr with ZooKeeper and is subject to change. The "official" way to do this would be to call the Solr HTTP API.

I think it would make sense to do this in the context of a BC release and update the test suite to run Solr >= 7 (supported). I started to do that, but ran into a few snags with config files.

acdha
acdha previously approved these changes Apr 17, 2020
@codecov
Copy link

codecov bot commented Apr 17, 2020

Codecov Report

Merging #315 into master will decrease coverage by 6.60%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   94.35%   87.74%   -6.61%     
==========================================
  Files           7        7              
  Lines        1328     1322       -6     
==========================================
- Hits         1253     1160      -93     
- Misses         75      162      +87     
Impacted Files Coverage Δ
pysolr.py 79.88% <ø> (-9.65%) ⬇️
tests/test_cloud.py 46.15% <0.00%> (-53.85%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a8887c...3a11bac. Read the comment docs.

@cclauss
Copy link
Contributor

cclauss commented Apr 26, 2023

Please rebase to run the tests.

@cclauss
Copy link
Contributor

cclauss commented Jun 27, 2023

@rokclimb15 Please rebase or close.

@rokclimb15
Copy link
Author

Closing in favor of #426

@rokclimb15 rokclimb15 closed this Sep 15, 2023
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.

3 participants