IGNITE-20866 Resolved a race condition issue in the cluster configuration initialization process#2844
Merged
tkalkirill merged 4 commits intoapache:mainfrom Nov 15, 2023
Merged
Conversation
…tion initialization process. Previously, the configuration was applied locally when the meta storage revision was 0, leading to potential race conditions and the configuration being ignored if the revision changed. Changes made: - Altered the initialization logic to first check for the local revision of the configuration key. - If the local revision is absent, the system now falls back to the initial configuration. This fix ensures more reliable and consistent application of the cluster configuration, particularly during initialization phases where the meta storage revision is susceptible to change.
tkalkirill
reviewed
Nov 15, 2023
...nfiguration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationChanger.java
Outdated
Show resolved
Hide resolved
...nfiguration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationChanger.java
Outdated
Show resolved
Hide resolved
...ion/src/main/java/org/apache/ignite/internal/configuration/storage/ConfigurationStorage.java
Outdated
Show resolved
Hide resolved
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
Outdated
Show resolved
Hide resolved
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
Outdated
Show resolved
Hide resolved
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
Outdated
Show resolved
Hide resolved
| // condition for update. | ||
| // Joining all of the above, it's concluded that the following condition must be used: | ||
| Condition condition = curChangeId == 0L | ||
| Condition condition = changeId == 0 |
Contributor
There was a problem hiding this comment.
Is it correct to delete the entire comment that was previously there?
Contributor
There was a problem hiding this comment.
I'd ask to re-formulate the Current node has already performed some updates or received them from MetaStorage watch listener. Simple Otherwise would do it.
Deleted part of the comment makes no sense after the fix, this is fine
tkalkirill
approved these changes
Nov 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/IGNITE-20866
Previously, the configuration was applied locally when the meta-storage revision was 0, leading to potential race conditions and the configuration being ignored if the revision changed.
Changes made:
This fix ensures more reliable and consistent application of the cluster configuration, particularly during initialization phases where the meta storage revision is susceptible to change.
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
The Review Checklist
- There is a single JIRA ticket related to the pull request.
- The web-link to the pull request is attached to the JIRA ticket.
- The JIRA ticket has the Patch Available state.
- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
Notes