-
Notifications
You must be signed in to change notification settings - Fork 791
SOLR-18008: Remnant core files prevent Collections for working #3904
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
base: main
Are you sure you want to change the base?
Conversation
dsmiley
left a comment
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.
I'd rather not see this solution...
| preExistingZkEntry = getZkController().checkIfCoreNodeNameAlreadyExists(cd); | ||
| } | ||
|
|
||
| if (Files.exists(cd.getInstanceDir())) { |
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.
The error you are trying to avoid, coming out of coresLocate.create, seems like a relatively fine protection in case a valid core is there. Curious; does calling a core admin level API to delete the core work? I don't mean replica deletion.
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.
i will take a looksee.
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.
i still need to check on this.
| @@ -0,0 +1,62 @@ | |||
| #!/usr/bin/env bats | |||
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.
I really don't think we should add a bats test for matters that JUnit could easily handle.
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.
I'm going to move it to junit. My challenge with the junit tests, and it might just be my knowledge, is that i sturggle to really feel like I understand how these junit tests really map to the real world. Whereas the bats tests map much closer. Maybe because I think from outside solr looking in, versus as a java coder, inside looking out.
For example, the logic of creating a fake directory to trigger the failure case. I get it in bats, and don't have a good sense of doing that in junit test.
Replica adds previously failed too.
…res.enabled setting.
|
Okay, two things.
|
https://issues.apache.org/jira/browse/SOLR-18008
Description
I've added two tests that simulate what happens if you have remnant core files that collide with new core creation.
@test "create replicated collections when core remnants exist"demonstrates when you create a collection and one of the cores exists.I am adding
@test "add replica when core remnants exist"that does the same for creating a replica.I am thinking of adding
@test "delete failed replica when replica create fails due to remnants exist"as I've seen that scenario also fail.Solution
Look at what changes to existing logic are required to deal with remnants existing. I'm not trying to figure out why we get remnants, as I don't have visibility into how it happens at this time.
Two scenarios that I've seen are adding a new collection where a core remnants already exists and adding a replica where the core remnants already exists.
Tests
Added a Junit test that demonstrates with and without the parameter. I wanted both in case at some point in the future the default behavior changes when it comes to remnants. I will delete the BATS test before merging.