Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-24359 Adjust ScanCloseReplicaRequest to be TableAware one #5198

Merged
merged 8 commits into from
Feb 11, 2025

Conversation

JAkutenshi
Copy link
Contributor

@JAkutenshi JAkutenshi commented Feb 9, 2025

JIRA Ticket: IGNITE-24359

The goal

The main goal of the ticket is to extend ScanCloseReplicaRequest with additional one TableAware interface.

The reason

We want to work with ScanCloseReplicaRequest through ZonePartitionId, but for proper table state machine selection we have to carry a table's identifier too.

The solution

The solution is straightforward:

  1. ScanCloseReplicaRequest now extends TableAware.
  2. In InternalTableImpl#completeScan we pass ZonePartitionId if the colocation feature flag is enabled and TablePartitionId otherwise.
  3. In both cases we pass tableId through new methods.
  4. A test that checks successful message building and handling is written as testScanCloseReplicaRequest: the test creates a node, a zone and a table, inserts several rows and then starts scan with explicit transaction that will be cancelled in the end and triggers InternalTableImpl#completeScan with explicitCloseCursor == true.

@JAkutenshi JAkutenshi marked this pull request as ready for review February 10, 2025 14:33
@sanpwc
Copy link
Contributor

sanpwc commented Feb 11, 2025

Could you please also adjust ScanCloseReplicaRequest building in PartitionReplicaListenerTest?

@JAkutenshi
Copy link
Contributor Author

Could you please also adjust ScanCloseReplicaRequest building in PartitionReplicaListenerTest?

Done

@JAkutenshi JAkutenshi requested a review from sanpwc February 11, 2025 10:08
# Conflicts:
#	modules/table/src/test/java/org/apache/ignite/internal/table/distributed/replication/PartitionReplicaListenerTest.java
@sanpwc sanpwc merged commit aa1d587 into apache:main Feb 11, 2025
1 check passed
@sanpwc sanpwc deleted the ignite-24359 branch February 11, 2025 12:32
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