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

SAI-4358 : PRS collection deletion race condition #103

Merged
merged 9 commits into from
May 24, 2023

Conversation

patsonluk
Copy link
Collaborator

@patsonluk patsonluk commented May 24, 2023

Description

This is just a cherry pick of commits from apache#1460

Detailed described in the above link

We are creating this PR as we want such change in our own repo (ran into that occasionally on playpen eu1 c91) as the upstream change is still under review

This same was reviewed for 8.8 as in fullstorydev/lucene-solr#210

@@ -35,6 +36,8 @@ public class PerReplicaStatesFetcher {
public static PerReplicaStates fetch(
String path, SolrZkClient zkClient, PerReplicaStates current) {
try {
assert CommonTestInjection.injectBreakpoint(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need to assert here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so that for normal execution (non unit test), this call will be ignored

Copy link
Collaborator

@hiteshk25 hiteshk25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…undException as their conditions/handling are quite different.
Copy link
Collaborator

@hiteshk25 hiteshk25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patsonluk patsonluk merged commit cce48a0 into fs/branch_9x May 24, 2023
@patsonluk patsonluk deleted the patsonluk/SAI-4358-prs-race branch May 24, 2023 23:57
patsonluk added a commit that referenced this pull request May 24, 2023
* Adding Breakpoint injection to CommonTestInjection

* ./gradlew tidy

* Fixed javadoc

* Fixed race condition for PRS collection on deletion

Added unit test case in ZkStateReaderTest#testDeletePrsCollection

* ./gradlew tidy

* Separate the exception handling of NoNodeException and PrsZkNodeNotFoundException as their conditions/handling are quite different.

* Fixed Execution failed for task ':solr:solrj-zookeeper:validateLogCalls'.

* ./gradlew tidy

* Fixed validateLogCalls
patsonluk added a commit that referenced this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants