-
Notifications
You must be signed in to change notification settings - Fork 1
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-21911 Change API usage of Placement driver in Index module from TablePartitionId to ZonePartitionId #100
IGNITE-21911 Change API usage of Placement driver in Index module from TablePartitionId to ZonePartitionId #100
Conversation
…m TablePartitionId to ZonePartitionId
e10f113
to
4d10b39
Compare
.enlistmentConsistencyToken(meta.getStartTime().longValue()) | ||
.groupId(partId) | ||
// TODO: discuss this timeout | ||
.timeout(10) |
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.
Extract to class scope constant?
...test/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptorTest.java
Show resolved
Hide resolved
...st/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptorTest.java
Show resolved
Hide resolved
...-handler/src/test/java/org/apache/ignite/client/handler/ClientPrimaryReplicaTrackerTest.java
Outdated
Show resolved
Hide resolved
modules/client/src/test/java/org/apache/ignite/client/PartitionAwarenessTest.java
Outdated
Show resolved
Hide resolved
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
Outdated
Show resolved
Hide resolved
modules/index/src/test/java/org/apache/ignite/internal/index/IndexBuildControllerTest.java
Outdated
Show resolved
Hide resolved
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/Replica.java
Outdated
Show resolved
Hide resolved
...replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaAwareLeaseTracker.java
Show resolved
Hide resolved
...replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaAwareLeaseTracker.java
Show resolved
Hide resolved
...replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaAwareLeaseTracker.java
Show resolved
Hide resolved
modules/table/src/testFixtures/java/org/apache/ignite/internal/table/TableTestUtils.java
Outdated
Show resolved
Hide resolved
@@ -339,11 +340,13 @@ private CompletableFuture<Boolean> primaryReplicaEventListener( | |||
Consumer<TablePartitionId> action | |||
) { | |||
return inBusyLock(busyLock, () -> { | |||
if (!(eventParameters.groupId() instanceof TablePartitionId)) { | |||
if (!(eventParameters.groupId() instanceof ZonePartitionId)) { |
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 is it not an assertion here?
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 prefer to leave it as it was in the main
@@ -292,11 +293,13 @@ void stop() { | |||
|
|||
private void onPrimaryReplicaChanged(PrimaryReplicaEventParameters primaryReplicaEvent) { | |||
inBusyLock(busyLock, () -> { | |||
if (!(primaryReplicaEvent.groupId() instanceof TablePartitionId)) { | |||
if (!(primaryReplicaEvent.groupId() instanceof ZonePartitionId)) { |
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.
This condition can be replaced with assert.
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 prefer to leave it as it was in the main
* @return Future that contains a result. | ||
*/ | ||
private CompletableFuture<Void> processWaitReplicaStateMessage(WaitReplicaStateMessage msg) { | ||
LOG.info("Received WaitReplicaStateMessage for replica belonging to group=" + groupId()); |
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.
Use our log format.
("WaitReplicaStateMessage was received [group={}]", groupId())
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.
fixed
.enlistmentConsistencyToken(meta.getStartTime().longValue()) | ||
.groupId(partId) | ||
// TODO: discuss this timeout |
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.
TODO without an issue number.
* It delegates calls to the original {@link PlacementDriver} and after that sends {@link WaitReplicaStateMessage} | ||
* which calls {@link org.apache.ignite.internal.replicator.Replica#waitForActualState(long)}. | ||
*/ | ||
public class ReplicaAwareLeaseTracker extends AbstractEventProducer<PrimaryReplicaEvent, PrimaryReplicaEventParameters> implements |
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 would inject the implementation into the lease tracker.
@@ -239,6 +239,7 @@ public static int getTableIdStrict(CatalogService catalogService, String tableNa | |||
return getTableStrict(catalogService, tableName, timestamp).id(); | |||
} | |||
|
|||
|
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.
Horrible, disgusting mistake. Please remove this empty line.
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.
fixed
https://issues.apache.org/jira/browse/IGNITE-21911