Skip to content

IGNITE-24364 Store zone-wide tx state storage per zone#5159

Merged
rpuch merged 12 commits intoapache:mainfrom
gridgain:ignite-24364
Feb 6, 2025
Merged

IGNITE-24364 Store zone-wide tx state storage per zone#5159
rpuch merged 12 commits intoapache:mainfrom
gridgain:ignite-24364

Conversation

@rpuch
Copy link
Copy Markdown
Contributor

@rpuch rpuch commented Feb 3, 2025

});
}

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

Choose a reason for hiding this comment

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

Please remove it.

return inBusyLockAsync(busyLock, () -> {
int zoneId = zoneDescriptor.id();

zoneResourcesManager.registerZonePartitionCount(zoneId, zoneDescriptor.partitions());
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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