IGNITE-28436 Introduce PartitionPageMemory for further reuse#7917
Merged
ibessonov merged 13 commits intoapache:mainfrom Apr 14, 2026
Merged
IGNITE-28436 Introduce PartitionPageMemory for further reuse#7917ibessonov merged 13 commits intoapache:mainfrom
PartitionPageMemory for further reuse#7917ibessonov merged 13 commits intoapache:mainfrom
Conversation
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
There was a problem hiding this comment.
Pull request overview
Introduces PartitionPageMemory as a partition-scoped page memory facade and migrates storage/index/page-memory components to consume it instead of the broader PageMemory, improving reuse and better expressing partition affinity.
Changes:
- Added
PartitionPageMemoryabstraction and delegate implementations for persistent and volatile page memory. - Refactored page-memory-backed storages/trees (MV, indexes, free list, page handlers) to accept
PartitionPageMemory. - Updated tests and benchmarks to create and use per-partition page memory instances.
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/mv/BlobStorageTest.java | Tests now use a spied PartitionPageMemory and stop page memory in @AfterEach. |
| modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/benchmarks/SortedIndexTreeInsertBenchmark.java | Benchmark passes PartitionPageMemory into SortedIndexTree and uses it for allocations. |
| modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryNoLoadTest.java | Tests now create dirty pages via PartitionPageMemory and adjust acquire/lock calls. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/gc/GcQueue.java | GcQueue now accepts PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/VolatilePageMemoryMvPartitionStorage.java | Storage now receives PartitionPageMemory and threads it through renewable state updates. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/VersionChainTree.java | VersionChainTree now accepts PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/RenewablePartitionStorageState.java | Stores a partition-scoped DataPageReader built from PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/PersistentPageMemoryMvPartitionStorage.java | Uses PartitionPageMemory for BlobStorage and for row-version traversal via renewable state. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/IndexStorageFactory.java | Keeps and uses a PartitionPageMemory for meta-page allocation and index tree creation. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/BlobStorage.java | BlobStorage now accepts PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/AbstractPageMemoryMvPartitionStorage.java | Removes per-storage DataPageReader; uses renewable state's reader instead, and updates state with PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/sorted/SortedIndexTree.java | SortedIndexTree now accepts PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/meta/IndexMetaTree.java | IndexMetaTree now accepts PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/hash/HashIndexTree.java | HashIndexTree now accepts PartitionPageMemory. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/VolatilePageMemoryTableStorage.java | Creates a PartitionPageMemory once per partition and shares it across created trees/storages. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/VolatilePageMemoryDataRegion.java | Free list is created with a PartitionPageMemory facade. |
| modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryTableStorage.java | Creates PartitionPageMemory and passes it through free-list/trees/gc queue creation. |
| modules/page-memory/src/testFixtures/java/org/apache/ignite/internal/pagememory/benchmark/VolatilePageMemoryBenchmarkBase.java | Benchmark fixtures now build FreeListImpl using PartitionPageMemory. |
| modules/page-memory/src/testFixtures/java/org/apache/ignite/internal/pagememory/benchmark/PersistentPageMemoryBenchmarkBase.java | Stores per-partition PartitionPageMemory in a concurrent map for benchmarks. |
| modules/page-memory/src/testFixtures/java/org/apache/ignite/internal/pagememory/AbstractPageMemoryNoLoadSelfTest.java | No-load tests now operate via PartitionPageMemory while stopping the owner PageMemory. |
| modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/persistence/throttling/PageMemoryThrottlingTest.java | Tests now allocate/acquire/lock via PartitionPageMemory, using the new writeLockForce. |
| modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/persistence/replacement/AbstractPageReplacementTest.java | Replacement tests now use PartitionPageMemory for page operations/allocations. |
| modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/inmemory/VolatilePageMemoryNoLoadSelfTest.java | Volatile no-load tests allocate via PartitionPageMemory. |
| modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/freelist/FreeListImplTest.java | Free list tests now create and pass PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/util/PageHandler.java | PageHandler helpers now accept PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/tree/BplusTree.java | B+Tree constructors now accept PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/PersistentPageMemory.java | Adds createPartitionPageMemory and internalizes previously PageMemory-interface methods. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/PartitionPageMemoryDelegate.java | New: persistent implementation of PartitionPageMemory via delegation. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/io/DataPageIo.java | Uses wrapPointer directly as pageBuffer moved off PageMemory; accepts PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/inmemory/VolatilePageMemoryDelegate.java | New: volatile implementation of PartitionPageMemory via delegation. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/inmemory/VolatilePageMemory.java | Adds createPartitionPageMemory and internalizes low-level page ops used by the delegate. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/freelist/PagesList.java | PagesList now accepts PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/freelist/FreeListImpl.java | FreeListImpl now accepts PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/datastructure/DataStructure.java | Base datastructure now stores PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/datapage/NonFragmentableDataPageReader.java | Reader now depends on PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/datapage/DataPageReader.java | Reader now depends on PartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/PartitionPageMemory.java | New: partition-scoped page memory abstraction. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/PageSupport.java | Adds writeLockForce and removes isDirty. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/PageMemory.java | Becomes a factory/owner (no longer extends PageSupport/PageIdAllocator), adds createPartitionPageMemory. |
| modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/PageIdAllocator.java | Adds TODO documenting upcoming removal of groupId params. |
| modules/page-memory/src/jmh/java/org/apache/ignite/internal/pagememory/benchmark/PageReplacementBenchmark.java | Tracks per-page PartitionPageMemory to avoid acquiring/releasing via the global PersistentPageMemory. |
| modules/page-memory/src/integrationTest/java/org/apache/ignite/internal/pagememory/tree/persistence/ItBplusTreePersistentPageMemoryTest.java | Integration tests now pass PartitionPageMemory to reuse list creation. |
| modules/page-memory/src/integrationTest/java/org/apache/ignite/internal/pagememory/tree/inmemory/ItBplusTreeVolatilePageMemoryTest.java | Integration tests now pass PartitionPageMemory to reuse list creation. |
| modules/page-memory/src/integrationTest/java/org/apache/ignite/internal/pagememory/tree/inmemory/ItBplusTreeFakeReuseVolatilePageMemoryTest.java | Integration tests now pass PartitionPageMemory to fake reuse implementation. |
| modules/page-memory/src/integrationTest/java/org/apache/ignite/internal/pagememory/tree/ItBplusTreeReplaceRemoveRaceTest.java | Creates and uses PartitionPageMemory in concurrent replace/remove race test. |
| modules/page-memory/src/integrationTest/java/org/apache/ignite/internal/pagememory/tree/AbstractBplusTreeReusePageMemoryTest.java | Reuse tests accept PartitionPageMemory for reuse list creation. |
| modules/page-memory/src/integrationTest/java/org/apache/ignite/internal/pagememory/tree/AbstractBplusTreePageMemoryTest.java | Base B+Tree tests create PartitionPageMemory once and route allocations through it. |
Comments suppressed due to low confidence (2)
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/BlobStorage.java:1
PartitionPageMemoryalready conceptually binds a specific(groupId, partitionId), butBlobStoragestill accepts and passes separategroupId/partitionIdvalues to theDataStructurebase. If these ever diverge, the structure metadata and the actual page operations can become inconsistent. Prefer deriving IDs frompageMemory.groupId()/partitionId()(or validate they match via assertions/argument checks) to prevent subtle misbinding bugs.
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/RenewablePartitionStorageState.java:1RenewablePartitionStorageStateis package-private, but this accessor is declaredpublic, which unnecessarily widens the API surface. Consider making the method package-private (no modifier) to keep visibility consistent with the class and reduce accidental external coupling.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
alievmirza
reviewed
Apr 7, 2026
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
alievmirza
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/IGNITE-28436
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