tkalkirill commented on code in PR #902:
URL: https://github.com/apache/ignite-3/pull/902#discussion_r910654403


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/store/FilePageStoreManager.java:
##########
@@ -177,19 +168,19 @@ public long allocatePage(int grpId, int partId, byte 
flags) throws IgniteInterna
      *
      * @param grpName Group name.
      * @param grpId Group ID.
-     * @param partitions Partition number, must be greater than {@code 0} and 
less {@link PageIdAllocator#MAX_PARTITION_ID} + 1.
+     * @param partitions Partition number, must be greater than {@code 0} and 
less {@link PageIdAllocator#MAX_PARTITION_ID}.
      * @throws IgniteInternalCheckedException If failed.
      */
     public void initialize(String grpName, int grpId, int partitions) throws 
IgniteInternalCheckedException {
-        assert partitions > 0 && partitions < MAX_PARTITION_ID + 1 : 
partitions;
+        assert partitions > 0 && partitions < MAX_PARTITION_ID : partitions;
 
         initGroupDirLock.lock(grpId);
 
         try {
             if (!groupPageStoreHolders.containsKey(grpId)) {

Review Comment:
   Creating files can take some more time than just putting an object into 
memory, from the documentation for **ConcurrentHashMap#computeIfAbsent**, it is 
recommended to make the function simple and fast so as not to block other 
threads.



-- 
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]

Reply via email to