-
Notifications
You must be signed in to change notification settings - Fork 91
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-22218 Remove TableRaftService in favor of using RaftGroupService from Replica instances #3973
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java # modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
…on waiting of restart
…maryReplicaChoiceTest` and `ItBuildIndexTest`
…sContain` is rewritten
# Conflicts: # modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
# Conflicts: # modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java # modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
…gAssignmentEvent` branch
…balance` (don't know actually why)
# Conflicts: # modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteInMemoryNodeRestartTest.java # modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
# Conflicts: # modules/index/src/integrationTest/java/org/apache/ignite/internal/index/ItBuildIndexTest.java # modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java # modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteInMemoryNodeRestartTest.java # modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java # modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
…Started` calls and `replica(...)` calls are asynchronous now.
…re events (eg inhibitors are enabled) => no primary => return false
…DestroyPartitionAndUpdateClients` with chaining of peer set update future and stop&destroy partition future instead of allOf.
# Conflicts: # modules/client/src/test/java/org/apache/ignite/client/fakes/FakeInternalTable.java # modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java # modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerRecoveryTest.java
# Conflicts: # modules/index/src/integrationTest/java/org/apache/ignite/internal/index/ItBuildIndexTest.java
@@ -81,6 +81,7 @@ dependencies { | |||
integrationTestImplementation testFixtures(project(':ignite-table')) | |||
integrationTestImplementation testFixtures(project(':ignite-storage-api')) | |||
integrationTestImplementation testFixtures(project(':ignite-catalog')) | |||
integrationTestImplementation testFixtures(project(':ignite-replicator')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new ReplicaTestUtils
is placed there
ScheduledExecutorService rebalanceScheduler | ||
) { | ||
ScheduledExecutorService rebalanceScheduler, | ||
ClockService clockService, PlacementDriver placementDriver) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One at a row, please. Please also move ) {
to a separate row.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -190,6 +205,9 @@ public PartitionReplicaLifecycleManager( | |||
this.lowWatermark = lowWatermark; | |||
this.ioExecutor = ioExecutor; | |||
this.rebalanceScheduler = rebalanceScheduler; | |||
this.clockService = clockService; | |||
// should it be ExecutorInclinedPlacementDriver as in TableManager? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should. And don't forget to remove the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't pass ExecutorInclinedPlacementDriver
there because it came from :ignite-table
, but there a circular dependency arises:
:ignite-partition-replicator:compileJava
\--- :ignite-table:compileJava
\--- :ignite-partition-replicator:compileJava (*)
Is it crucial?
return assignments.stream().anyMatch(isLocalNodeAssignment); | ||
} | ||
|
||
private CompletableFuture<Boolean> isLocalNodeLeaseholder(ReplicationGroupId replicationGroupId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather use isLocalNodeIsPrimary instead of "...Leaseholder".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed
return assignments.stream().anyMatch(isLocalNodeAssignment); | ||
} | ||
|
||
private CompletableFuture<Boolean> isLocalNodeLeaseholder(ReplicationGroupId replicationGroupId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add javadoc explaning contract of the method. Especially it's important to clarify how do we evaluate base timestamp for leaseholder detection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java doc is added, the method is fixed due to the lifecycle manager's version some how became is out of date a little.
JIRA Ticket: IGNITE-22218 | Remove
TableRaftService
in favor of usingRaftGroupService
fromReplica
instancesThe goal
The goal of the PR is to remove
TableRaftService
and it's usages.The reason
TableRaftService
is a leakage of RAFT-specific code onto other layers that should be prohibited.The solution
All occurrences should be replaced with:
Class
TableRaftService
should be removed completely.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