Skip to content

IGNITE-28216 Advance last applied index for each partition command#7770

Open
rpuch wants to merge 3 commits intoapache:mainfrom
gridgain:ignite-28216
Open

IGNITE-28216 Advance last applied index for each partition command#7770
rpuch wants to merge 3 commits intoapache:mainfrom
gridgain:ignite-28216

Conversation

@rpuch
Copy link
Contributor

@rpuch rpuch commented Mar 12, 2026

@rpuch rpuch requested a review from Copilot March 12, 2026 16:26
Copy link

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

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 lastApplied behavior.

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.

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