-
Notifications
You must be signed in to change notification settings - Fork 102
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-24364 Store zone-wide tx state storage per zone #5159
Conversation
...n/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
Show resolved
Hide resolved
...ator/src/main/java/org/apache/ignite/internal/partition/replicator/ZoneResourcesManager.java
Show resolved
Hide resolved
...ator/src/main/java/org/apache/ignite/internal/partition/replicator/ZoneResourcesManager.java
Outdated
Show resolved
Hide resolved
...ator/src/main/java/org/apache/ignite/internal/partition/replicator/ZoneResourcesManager.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/apache/ignite/internal/partition/replicator/ZoneResourcesManagerTest.java
Show resolved
Hide resolved
...n/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
Outdated
Show resolved
Hide resolved
@@ -521,6 +541,16 @@ private CompletableFuture<?> createZonePartitionReplicationNode( | |||
}); | |||
} | |||
|
|||
private CatalogZoneDescriptor zoneDescriptorAt(int zoneId, long timestamp) { |
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.
Please remove it.
@@ -413,6 +423,8 @@ private CompletableFuture<Void> calculateZoneAssignmentsAndCreateReplicationNode | |||
return inBusyLockAsync(busyLock, () -> { | |||
int zoneId = zoneDescriptor.id(); | |||
|
|||
zoneResourcesManager.registerZonePartitionCount(zoneId, zoneDescriptor.partitions()); |
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 don't like such approach.
What about using
catalogMgr.activeCatalog(metaStorageMgr.timestampByRevisionLocally(revision).longValue()).zone(zonePartitionId.zoneId()).partitions();
in order to retrieve partitions count in PartitionReplicaLifecycleManager#createZonePartitionReplicationNode
and thus propagating the count to ZoneResourcesManager#getOrCreatePartitionTxStateStorage
?
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 timestamp on MS entry for a catalog update is not the same as activation timestamp of the catalog update
- This seems really fragile
- We could probably get into trouble with MS compaction
Current approach is simple and solves the task at hand. Also, it doesn't introduce races. Why don't you like it?
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 changed the approach: registration is removed
https://issues.apache.org/jira/browse/IGNITE-24364