timoninmaxim commented on code in PR #10561:
URL: https://github.com/apache/ignite/pull/10561#discussion_r1118993034
##########
modules/ducktests/tests/ignitetest/services/utils/path.py:
##########
@@ -235,3 +242,20 @@ def script(self, script_name):
:return: absolute path to the specified script
"""
return os.path.join(self.home_dir, "bin", script_name)
+
+ def cache_dir(self, consistent_dir, cache_name):
+ """
+ :param consistent_dir: consistent ID directory.
+ :param cache_name: cachen name.
Review Comment:
s/cachen/cache/
##########
modules/ducktests/tests/ignitetest/tests/index_rebuild_test.py:
##########
@@ -0,0 +1,165 @@
+# 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.
+
+"""
+Module contains index.bin rebuild tests.
+"""
+import time
+
+from ducktape.mark import defaults
+
+from ignitetest.services.ignite import IgniteService
+from ignitetest.services.utils.control_utility import ControlUtility
+from ignitetest.services.utils.ignite_aware import IgniteAwareService
+from ignitetest.services.utils.ignite_configuration import
DataStorageConfiguration, IgniteConfiguration
+from ignitetest.services.utils.ignite_configuration.data_storage import
DataRegionConfiguration
+from ignitetest.services.utils.ignite_configuration.discovery import
from_ignite_cluster
+from ignitetest.tests.rebalance.util import NUM_NODES
+from ignitetest.tests.util import DataGenerationParams, preload_data
+from ignitetest.utils import cluster, ignite_versions
+from ignitetest.utils.ignite_test import IgniteTest
+from ignitetest.utils.version import DEV_BRANCH, LATEST, IgniteVersion
+
+
+def get_file_sizes(nodes: list, file: str) -> dict:
+ """
+ Return WAL size in bytes.
Review Comment:
s/WAL/file/
##########
modules/ducktests/tests/ignitetest/services/utils/path.py:
##########
@@ -235,3 +242,20 @@ def script(self, script_name):
:return: absolute path to the specified script
"""
return os.path.join(self.home_dir, "bin", script_name)
+
+ def cache_dir(self, consistent_dir, cache_name):
+ """
+ :param consistent_dir: consistent ID directory.
+ :param cache_name: cachen name.
+ :return: absolute path to the cache directory.
+ """
+ consistent_dir = consistent_dir.replace('.', '_')
+ return os.path.join(self.database_dir, consistent_dir,
f'cache-{cache_name}')
+
+ def index_file(self, consistent_dir, cache_name):
+ """
+ :param consistent_dir: consistent ID directory.
+ :param cache_name: cachen name.
Review Comment:
s/cachen/cache/
##########
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/DataGenerationApplication.java:
##########
@@ -41,14 +50,40 @@ public class DataGenerationApplication extends
IgniteAwareApplication {
int from = jsonNode.get("from").asInt();
int to = jsonNode.get("to").asInt();
+ int idxCnt = 0;
+
+ if (jsonNode.has("indexCount"))
+ idxCnt = jsonNode.get("indexCount").asInt();
+
markInitialized();
for (int i = 1; i <= cacheCnt; i++) {
- IgniteCache<Integer, BinaryObject> cache = ignite.getOrCreateCache(
- new CacheConfiguration<Integer, BinaryObject>("test-cache-" +
i)
- .setBackups(backups));
+ CacheConfiguration<Integer, BinaryObject> ccfg = new
CacheConfiguration<Integer, BinaryObject>("test-cache-" + i)
+ .setBackups(backups);
+
+ if (idxCnt > 0) {
+ QueryEntity qe = new QueryEntity();
+ List<QueryIndex> qi = new ArrayList<>(idxCnt);
+
+ qe.setKeyType(Integer.class.getName());
+ qe.setValueType(VAL_TYPE);
+
+ for (int j = 0; j < idxCnt; j++) {
+ String field = "UUID" + j;
Review Comment:
Let's replace it with byte array? In same manner as it's done for val. WDYT?
--
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]