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-24364 Store zone-wide tx state storage per zone #5159

Merged
merged 12 commits into from
Feb 6, 2025

Conversation

rpuch
Copy link
Contributor

@rpuch rpuch commented Feb 3, 2025

@@ -521,6 +541,16 @@ private CompletableFuture<?> createZonePartitionReplicationNode(
});
}

private CatalogZoneDescriptor zoneDescriptorAt(int zoneId, long timestamp) {
Copy link
Contributor

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());
Copy link
Contributor

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
?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The timestamp on MS entry for a catalog update is not the same as activation timestamp of the catalog update
  2. This seems really fragile
  3. 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?

Copy link
Contributor Author

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

@rpuch rpuch merged commit 6834b9f into apache:main Feb 6, 2025
1 check passed
@rpuch rpuch deleted the ignite-24364 branch February 6, 2025 13:52
zstan pushed a commit to gridgain/apache-ignite-3 that referenced this pull request Feb 10, 2025
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