IGNITE-28216 Advance last applied index for each partition command#7770
Open
rpuch wants to merge 3 commits intoapache:mainfrom
Open
IGNITE-28216 Advance last applied index for each partition command#7770rpuch wants to merge 3 commits intoapache:mainfrom
rpuch wants to merge 3 commits intoapache:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Advances RAFT lastApplied metadata for additional command paths to ensure progress is recorded even when commands are effectively no-ops for a given partition/table.
Changes:
- Ensure
lastApplied(index, term)gets advanced for commands that may not touch any table storage (e.g., minimum-active-tx-time, write-intent-switch with missing tables). - Add assertions and broaden tests to cover “no-op but must advance lastApplied” scenarios, including leaseStartTime variations.
- Adjust integration/unit tests to use real/spied storages to validate
lastAppliedbehavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/table/src/test/java/org/apache/ignite/internal/table/distributed/raft/PartitionCommandListenerTest.java | Expands parameterized coverage for commands/variations that must advance lastApplied. |
| modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/handlers/MinimumActiveTxTimeCommandHandler.java | Explicitly bumps MV storage lastApplied for minimum-active-tx-time updates. |
| modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/TablePartitionProcessor.java | Adds post-condition assertion and advances lastApplied in additional lease-mismatch paths. |
| modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableReadOnlyOperationsTest.java | Switches to a spied real TestMvPartitionStorage to observe lastApplied updates. |
| modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItAbstractInternalTableScanTest.java | Same as above for scan-related integration tests. |
| modules/partition-replicator/src/test/java/org/apache/ignite/internal/partition/replicator/raft/ZonePartitionRaftListenerTest.java | Adds tests asserting which storage advances lastApplied when no table processor is present. |
| modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/raft/handlers/WriteIntentSwitchCommandHandler.java | Advances tx-state lastApplied when write-intent-switch doesn’t apply anywhere. |
| modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/raft/ZonePartitionRaftListener.java | Advances tx-state lastApplied for table-missing and cross-table commands with no processors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
...pache/ignite/internal/table/distributed/raft/handlers/MinimumActiveTxTimeCommandHandler.java
Show resolved
Hide resolved
...src/main/java/org/apache/ignite/internal/table/distributed/raft/TablePartitionProcessor.java
Show resolved
Hide resolved
...ain/java/org/apache/ignite/internal/partition/replicator/raft/ZonePartitionRaftListener.java
Show resolved
Hide resolved
…r WI switch if no tables at all were found to process the request
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-28216