You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sashapolo (via GitHub)" <gi...@apache.org> on 2025/05/22 16:48:22 UTC

[PR] IGNITE-25425 Dynamically compute data region sizes [ignite-3]

sashapolo opened a new pull request, #5886:
URL: https://github.com/apache/ignite-3/pull/5886

   https://issues.apache.org/jira/browse/IGNITE-25425
   
   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
   - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:  
   \- 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.
   - [ ] **Design:** new code conforms with the design principles of the components it is added to.
   - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
   - [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
   - [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
   
   ### Notes
   - [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25425 Dynamically compute data region sizes [ignite-3]

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #5886:
URL: https://github.com/apache/ignite-3/pull/5886#discussion_r2106734796


##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationRegistry.java:
##########
@@ -118,6 +124,12 @@ public InnerNode createRootNode(RootKey<?, ?> rootKey) {
     public CompletableFuture<Void> startAsync(ComponentContext componentContext) {
         changer.start();
 
+        // Initialize local configuration on start so that it can be read and modified during component start.
+        // Distributed configuration will be initialized during the "notifyCurrentConfigurationListeners" call.
+        if (configurationType == ConfigurationType.LOCAL) {

Review Comment:
   Can it be done outside of `startAsync`?



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/storageprofile/ItStorageProfilesTest.java:
##########
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.storageprofile;
+
+import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
+
+import com.typesafe.config.parser.ConfigDocument;
+import com.typesafe.config.parser.ConfigDocumentFactory;
+import org.apache.ignite.configuration.NamedListView;
+import org.apache.ignite.internal.ClusterPerClassIntegrationTest;
+import org.apache.ignite.internal.app.IgniteImpl;
+import org.apache.ignite.internal.pagememory.configuration.schema.PersistentPageMemoryProfileView;
+import org.apache.ignite.internal.pagememory.configuration.schema.VolatilePageMemoryProfileView;
+import org.apache.ignite.internal.storage.configurations.StorageExtensionConfiguration;
+import org.apache.ignite.internal.storage.configurations.StorageProfileView;
+import org.apache.ignite.internal.storage.engine.StorageEngine;
+import org.apache.ignite.internal.storage.pagememory.PersistentPageMemoryStorageEngine;
+import org.apache.ignite.internal.storage.pagememory.VolatilePageMemoryStorageEngine;
+import org.apache.ignite.internal.storage.rocksdb.RocksDbStorageEngine;
+import org.apache.ignite.internal.storage.rocksdb.configuration.schema.RocksDbProfileView;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test class for validating storage profiles configuration.
+ */
+public class ItStorageProfilesTest extends ClusterPerClassIntegrationTest {
+    private static final String AIPERSIST_PROFILE_NAME = ItStorageProfilesTest.class.getSimpleName() + "_aipersist";
+    private static final String AIMEM_PROFILE_NAME = ItStorageProfilesTest.class.getSimpleName() + "_aimem";
+    private static final String ROCKSDB_PROFILE_NAME = ItStorageProfilesTest.class.getSimpleName() + "_rocksdb";
+
+    @Override
+    protected int initialNodes() {
+        return 1;
+    }
+
+    @Override
+    protected String getNodeBootstrapConfigTemplate() {
+        ConfigDocument document = ConfigDocumentFactory.parseString(super.getNodeBootstrapConfigTemplate());

Review Comment:
   I wish we had something like this:
   ```
   @NodeConfig(key = "ignite.storage.profiles.name.size", value = "-1");
   ```
   
   It's unrelated to your PR though



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25425 Dynamically compute data region sizes [ignite-3]

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #5886:
URL: https://github.com/apache/ignite-3/pull/5886#discussion_r2106923881


##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationRegistry.java:
##########
@@ -118,6 +124,12 @@ public InnerNode createRootNode(RootKey<?, ?> rootKey) {
     public CompletableFuture<Void> startAsync(ComponentContext componentContext) {
         changer.start();
 
+        // Initialize local configuration on start so that it can be read and modified during component start.
+        // Distributed configuration will be initialized during the "notifyCurrentConfigurationListeners" call.
+        if (configurationType == ConfigurationType.LOCAL) {

Review Comment:
   Never mind



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25425 Dynamically compute data region sizes [ignite-3]

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #5886:
URL: https://github.com/apache/ignite-3/pull/5886#discussion_r2105183605


##########
modules/runner/src/testFixtures/java/org/apache/ignite/internal/testframework/TestIgnitionManager.java:
##########
@@ -61,16 +62,18 @@ public class TestIgnitionManager {
     public static final long DEFAULT_MAX_CLOCK_SKEW_MS = TestClockService.TEST_MAX_CLOCK_SKEW_MILLIS;
 
     /** Map with default node configuration values. */
-    private static final Map<String, String> DEFAULT_NODE_CONFIG = Map.of(

Review Comment:
   Note to reviewer: default RocksDB storage profile configuration was missing



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25425 Dynamically compute data region sizes [ignite-3]

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #5886:
URL: https://github.com/apache/ignite-3/pull/5886#discussion_r2106779391


##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationRegistry.java:
##########
@@ -118,6 +124,12 @@ public InnerNode createRootNode(RootKey<?, ?> rootKey) {
     public CompletableFuture<Void> startAsync(ComponentContext componentContext) {
         changer.start();
 
+        // Initialize local configuration on start so that it can be read and modified during component start.
+        // Distributed configuration will be initialized during the "notifyCurrentConfigurationListeners" call.
+        if (configurationType == ConfigurationType.LOCAL) {

Review Comment:
   Can you elaborate please? Why should it be outside?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25425 Dynamically compute data region sizes [ignite-3]

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo merged PR #5886:
URL: https://github.com/apache/ignite-3/pull/5886


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org