tkalkirill commented on code in PR #1325:
URL: https://github.com/apache/ignite-3/pull/1325#discussion_r1030800072
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/store/FilePageStoreManager.java:
##########
@@ -230,78 +269,86 @@ public long allocatePage(int grpId, int partId, byte
flags) throws IgniteInterna
}
/**
- * Initializing the file page stores for a group.
+ * Initialization of the page storage for the group partition.
*
* @param tableName Table name.
* @param tableId Integer table id.
- * @param partitions Partition number, must be greater than {@code 0} and
less {@link PageIdAllocator#MAX_PARTITION_ID}.
+ * @param partitionId Partition ID, must be between {@code 0} (inclusive)
and {@link PageIdAllocator#MAX_PARTITION_ID} (inclusive).
* @throws IgniteInternalCheckedException If failed.
*/
- public void initialize(String tableName, int tableId, int partitions)
throws IgniteInternalCheckedException {
- assert partitions > 0 && partitions < MAX_PARTITION_ID : partitions;
+ public void initialize(String tableName, int tableId, int partitionId)
throws IgniteInternalCheckedException {
+ assert partitionId >= 0 && partitionId <= MAX_PARTITION_ID :
partitionId;
- initGroupDirLock.lock(tableId);
+ stripedLock.lock(tableId + partitionId);
try {
- if (!groupPageStores.containsPageStores(tableId)) {
- List<FilePageStore> partitionFilePageStores =
createFilePageStores(tableId, partitions);
+ if (!groupPageStores.contains(tableId, partitionId)) {
+ Path tableWorkDir = ensureGroupWorkDir(tableId);
Review Comment:
Created a technical debt ticket
https://issues.apache.org/jira/browse/IGNITE-18245
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]