Skip to content

IGNITE-25179 Fix AssertionError on table stopping when the colocation is enabled#5664

Merged
sk0x50 merged 3 commits into
apache:mainfrom
sk0x50:ignite-25179
Apr 23, 2025
Merged

IGNITE-25179 Fix AssertionError on table stopping when the colocation is enabled#5664
sk0x50 merged 3 commits into
apache:mainfrom
sk0x50:ignite-25179

Conversation

@sk0x50
Copy link
Copy Markdown
Contributor

@sk0x50 sk0x50 commented Apr 17, 2025

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

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - 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.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

@sk0x50 sk0x50 requested review from Copilot and rpuch April 22, 2025 10:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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();

@sk0x50 sk0x50 merged commit 0d26094 into apache:main Apr 23, 2025
1 check passed
@sk0x50 sk0x50 deleted the ignite-25179 branch April 23, 2025 09:43
Copy link
Copy Markdown
Contributor

@rpuch rpuch left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants