IGNITE-25179 Fix AssertionError on table stopping when the colocation is enabled#5664
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses the AssertionError encountered when stopping a table with colocation enabled by adjusting how null resources are handled and modifying concurrency control in the low watermark update logic.
- Replaces assertions with explicit null-checks in ZoneResourcesManager.
- Adds an assertion in PartitionReplicaLifecycleManager to catch missing zone partition resources.
- Removes write lock usage in LowWatermarkImpl during low watermark update.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/ZoneResourcesManager.java | Replaces assert with null-check and annotates method return with @nullable. |
| modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java | Adds an assert to verify that zone partition resources are not null before proceeding. |
| modules/low-watermark/src/main/java/org/apache/ignite/internal/lowwatermark/LowWatermarkImpl.java | Removes explicit locking in setLowWatermark, potentially impacting thread safety. |
Comments suppressed due to low confidence (1)
modules/low-watermark/src/main/java/org/apache/ignite/internal/lowwatermark/LowWatermarkImpl.java:236
- The removal of the write lock may lead to concurrent modification issues in a multi-threaded context. Please confirm that the concurrent access to lowWatermark is correctly managed without this lock.
updateLowWatermarkLock.writeLock().lock();
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-25179
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