(ignite) branch master updated: IGNITE-22464 Java thin client: Add events for client start and stop - Fixes #11387.

2024-06-13 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 6721ab9d020 IGNITE-22464 Java thin client: Add events for client start 
and stop - Fixes #11387.
6721ab9d020 is described below

commit 6721ab9d020a606a6fd5405dcbbc36909271526b
Author: Aleksey Plekhanov 
AuthorDate: Thu Jun 13 16:30:15 2024 +0500

IGNITE-22464 Java thin client: Add events for client start and stop - Fixes 
#11387.

Signed-off-by: Aleksey Plekhanov 
---
 .../ignite/client/events/ClientFailEvent.java  | 54 +
 .../ignite/client/events/ClientLifecycleEvent.java | 25 ++
 .../events/ClientLifecycleEventListener.java   | 44 ++
 .../ignite/client/events/ClientStartEvent.java | 55 +
 .../ignite/client/events/ClientStopEvent.java  | 42 ++
 .../internal/client/thin/TcpIgniteClient.java  | 56 -
 .../IgniteClientLifecycleEventListenerTest.java| 94 ++
 .../org/apache/ignite/client/ClientTestSuite.java  |  2 +
 8 files changed, 371 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/client/events/ClientFailEvent.java
 
b/modules/core/src/main/java/org/apache/ignite/client/events/ClientFailEvent.java
new file mode 100644
index 000..a6e1592cee6
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/client/events/ClientFailEvent.java
@@ -0,0 +1,54 @@
+/*
+ * 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.client.events;
+
+import org.apache.ignite.configuration.ClientConfiguration;
+
+/**
+ * Event, triggered when Ignite client is failed to start.
+ */
+public class ClientFailEvent implements ClientLifecycleEvent {
+/** */
+private final ClientConfiguration cfg;
+
+/** */
+private final Throwable throwable;
+
+/**
+ * @param cfg Client configuration.
+ * @param throwable Throwable that caused the failure.
+ */
+public ClientFailEvent(ClientConfiguration cfg, Throwable throwable) {
+this.cfg = cfg;
+this.throwable = throwable;
+}
+
+/**
+ * @return Client configuration.
+ */
+public ClientConfiguration configuration() {
+return cfg;
+}
+
+/**
+ * @return A cause of the failure.
+ */
+public Throwable throwable() {
+return throwable;
+}
+}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/client/events/ClientLifecycleEvent.java
 
b/modules/core/src/main/java/org/apache/ignite/client/events/ClientLifecycleEvent.java
new file mode 100644
index 000..ffc277157c1
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/client/events/ClientLifecycleEvent.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.events;
+
+/**
+ * Marker interface for all client's lifecycle events.
+ */
+public interface ClientLifecycleEvent {
+// No-op.
+}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/client/events/ClientLifecycleEventListener.java
 
b/modules/core/src/main/java/org/apache/ignite/client/events/ClientLifecycleEventListener.java
new file mode 100644
index 000..98fe8080ac3
--- /dev/null
+++ 
b/modules/core/src/m

(ignite) branch master updated: IGNITE-22449 Documentation: Add new Cache View column (#11385)

2024-06-11 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new faea3b29832 IGNITE-22449 Documentation: Add new Cache View column 
(#11385)
faea3b29832 is described below

commit faea3b29832f0c96336131a4d7b237f376b0894e
Author: Maksim Davydov <70368398+maksa...@users.noreply.github.com>
AuthorDate: Tue Jun 11 16:14:02 2024 +0300

IGNITE-22449 Documentation: Add new Cache View column (#11385)
---
 docs/_docs/monitoring-metrics/system-views.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/_docs/monitoring-metrics/system-views.adoc 
b/docs/_docs/monitoring-metrics/system-views.adoc
index cfa604d205f..1e893914a61 100644
--- a/docs/_docs/monitoring-metrics/system-views.adoc
+++ b/docs/_docs/monitoring-metrics/system-views.adoc
@@ -115,6 +115,7 @@ control.bat --system-view NODE_METRICS --node-id 
a1b77663-b37f-4ddf-87a6-1e2d684
 |EVICTION_POLICY_FACTORY | string |  toString representation of eviction 
policy factory
 |EXPIRY_POLICY_FACTORY | string |  toString representation of expiry policy 
factory
 |CONFLICT_RESOLVER | string |  toString representation of cache conflict 
resolver
+|HAS_EXPIRING_ENTRIES | string | Yes if cache has entries pending expire
 |INTERCEPTOR | string |  toString representation of interceptor
 |IS_COPY_ON_READ | boolean | Flag indicating whether a copy of the value 
stored in the on-heap cache
 |IS_EAGER_TTL | boolean | Flag indicating whether expired cache entries will 
be eagerly removed from cache



(ignite) branch master updated: IGNITE-22439 SQL Calcite: Add test for duplicate keys (#11380)

2024-06-10 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new b43ca988726 IGNITE-22439 SQL Calcite: Add test for duplicate keys 
(#11380)
b43ca988726 is described below

commit b43ca9887265a451a94a8c636717d9259611f290
Author: Andrey Nadyktov 
AuthorDate: Mon Jun 10 17:04:01 2024 +0300

IGNITE-22439 SQL Calcite: Add test for duplicate keys (#11380)
---
 .../query/calcite/integration/TableDmlIntegrationTest.java | 14 ++
 1 file changed, 14 insertions(+)

diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDmlIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDmlIntegrationTest.java
index 310dff67192..513db94d7c0 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDmlIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDmlIntegrationTest.java
@@ -571,6 +571,20 @@ public class TableDmlIntegrationTest extends 
AbstractBasicIntegrationTest {
 checkWrongDefault("UUID", "FALSE");
 }
 
+/**
+ * Test checks the impossibility of inserting duplicate keys.
+ */
+@Test
+public void testInsertDuplicateKey() {
+executeSql("CREATE TABLE test (a int primary key, b int)");
+
+executeSql("INSERT INTO test VALUES (0, 0)");
+executeSql("INSERT INTO test VALUES (1, 1)");
+
+assertThrows("INSERT INTO test VALUES (1, 2)", 
IgniteSQLException.class,
+"Failed to INSERT some keys because they are already in 
cache");
+}
+
 /** */
 private void checkDefaultValue(String sqlType, String sqlVal, Object 
expectedVal) {
 try {



(ignite) branch master updated: IGNITE-22189 Add expiry policy info to CacheView - Fixes #11357.

2024-06-10 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 794a536737f IGNITE-22189 Add expiry policy info to CacheView - Fixes 
#11357.
794a536737f is described below

commit 794a536737f316765e83cb49d661f80849d3bd47
Author: Maksim Davydov 
AuthorDate: Mon Jun 10 18:51:00 2024 +0500

IGNITE-22189 Add expiry policy info to CacheView - Fixes #11357.

Signed-off-by: Aleksey Plekhanov 
---
 .../ignite/jdbc/thin/JdbcThinMetadataSelfTest.java |   1 +
 .../systemview/walker/CacheViewWalker.java | 176 +++--
 .../cache/IgniteCacheOffheapManager.java   |   8 +
 .../cache/IgniteCacheOffheapManagerImpl.java   |  16 ++
 .../cache/persistence/GridCacheOffheapManager.java |  33 
 .../ignite/spi/systemview/view/CacheView.java  |  80 +-
 .../metric/SystemViewCacheExpiryPolicyTest.java| 114 +
 .../ignite/internal/metric/SystemViewSelfTest.java | 110 +
 .../ignite/testsuites/IgniteCacheTestSuite13.java  |   2 +
 9 files changed, 452 insertions(+), 88 deletions(-)

diff --git 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
index 135c6fc6a24..82b4fc533e0 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
@@ -708,6 +708,7 @@ public class JdbcThinMetadataSelfTest extends 
JdbcThinAbstractSelfTest {
 "SYS.CACHES.NEAR_CACHE_EVICTION_POLICY_FACTORY.null",
 "SYS.CACHES.NEAR_CACHE_START_SIZE.null",
 "SYS.CACHES.DEFAULT_LOCK_TIMEOUT.null",
+"SYS.CACHES.HAS_EXPIRING_ENTRIES.null",
 "SYS.CACHES.INTERCEPTOR.null",
 "SYS.CACHES.CACHE_STORE_FACTORY.null",
 "SYS.CACHES.IS_STORE_KEEP_BINARY.null",
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/CacheViewWalker.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/CacheViewWalker.java
index cc98a093710..c59e8f96b74 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/CacheViewWalker.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/CacheViewWalker.java
@@ -54,49 +54,50 @@ public class CacheViewWalker implements 
SystemViewRowAttributeWalker
 v.accept(16, "evictionFilter", String.class);
 v.accept(17, "evictionPolicyFactory", String.class);
 v.accept(18, "expiryPolicyFactory", String.class);
-v.accept(19, "interceptor", String.class);
-v.accept(20, "isCopyOnRead", boolean.class);
-v.accept(21, "isEagerTtl", boolean.class);
-v.accept(22, "isEncryptionEnabled", boolean.class);
-v.accept(23, "isEventsDisabled", boolean.class);
-v.accept(24, "isInvalidate", boolean.class);
-v.accept(25, "isLoadPreviousValue", boolean.class);
-v.accept(26, "isManagementEnabled", boolean.class);
-v.accept(27, "isNearCacheEnabled", boolean.class);
-v.accept(28, "isOnheapCacheEnabled", boolean.class);
-v.accept(29, "isReadFromBackup", boolean.class);
-v.accept(30, "isReadThrough", boolean.class);
-v.accept(31, "isSqlEscapeAll", boolean.class);
-v.accept(32, "isSqlOnheapCacheEnabled", boolean.class);
-v.accept(33, "isStatisticsEnabled", boolean.class);
-v.accept(34, "isStoreKeepBinary", boolean.class);
-v.accept(35, "isWriteBehindEnabled", boolean.class);
-v.accept(36, "isWriteThrough", boolean.class);
-v.accept(37, "maxConcurrentAsyncOperations", int.class);
-v.accept(38, "maxQueryIteratorsCount", int.class);
-v.accept(39, "nearCacheEvictionPolicyFactory", String.class);
-v.accept(40, "nearCacheStartSize", int.class);
-v.accept(41, "nodeFilter", String.class);
-v.accept(42, "partitionLossPolicy", PartitionLossPolicy.class);
-v.accept(43, "queryDetailMetricsSize", int.class);
-v.accept(44, "queryParallelism", int.class);
-v.accept(45, "rebalanceBatchSize", int.class);
-v.accept(46, "rebalanceBatchesPrefetchCount", long.class);
-v.accept(47, "rebalanceDel

(ignite-extensions) branch master updated: IGNITE-22381 Fix java8 and java11 compilation - Fixes #271.

2024-06-04 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
 new a5f6294e IGNITE-22381 Fix java8 and java11 compilation - Fixes #271.
a5f6294e is described below

commit a5f6294e52ac4489c5813a975c0feb168e23e49f
Author: Aleksey Plekhanov 
AuthorDate: Tue Jun 4 15:22:45 2024 +0500

IGNITE-22381 Fix java8 and java11 compilation - Fixes #271.

Signed-off-by: Aleksey Plekhanov 
---
 modules/gatling-ext/examples/pom.xml | 12 +++-
 parent-internal/pom.xml  | 13 -
 pom.xml  | 10 +-
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/modules/gatling-ext/examples/pom.xml 
b/modules/gatling-ext/examples/pom.xml
index 81c7475b..381619a0 100644
--- a/modules/gatling-ext/examples/pom.xml
+++ b/modules/gatling-ext/examples/pom.xml
@@ -30,6 +30,16 @@
 
 ignite-gatling-plugin-examples
 
+
+
+false
+${maven.test.skip}
+${skipTests}
+
+
 
 
 ${project.groupId}
@@ -66,7 +76,7 @@
 io.gatling
 gatling-maven-plugin
 
-false
+${skipGatlingMavenPlugin}
 true
 
 
diff --git a/parent-internal/pom.xml b/parent-internal/pom.xml
index 05a3714d..85ae94c1 100644
--- a/parent-internal/pom.xml
+++ b/parent-internal/pom.xml
@@ -194,19 +194,14 @@
 
 
 
-java-9+
+java-11+
 
-[9,)
+[11,)
 
 
-8
+1.8
+11
 
-
-
-java-15+
-
-[15,)
-
 
 
 
diff --git a/pom.xml b/pom.xml
index 4be96882..55f270e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,6 @@
 modules/osgi-ext
 modules/ssh-ext
 modules/ml-ext
-modules/gatling-ext
 
 
 
@@ -70,6 +69,15 @@
 ../ignite
 
 
+
+java-11+
+
+[11,)
+
+
+modules/gatling-ext
+
+
 
 java-17+
 



(ignite-extensions) branch master updated: IGNITE-21990 Fix performance statistics query records aggregation - Fixes #259.

2024-05-30 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
 new 42522a6a IGNITE-21990 Fix performance statistics query records 
aggregation - Fixes #259.
42522a6a is described below

commit 42522a6ae8404b07c97bab63de2730b1500d28c3
Author: Aleksey Plekhanov 
AuthorDate: Thu May 30 11:00:43 2024 +0300

IGNITE-21990 Fix performance statistics query records aggregation - Fixes 
#259.

Signed-off-by: Aleksey Plekhanov 
---
 .../performance-statistics-ext/report/js/sqlTab.js |   2 +-
 .../handlers/QueryHandler.java | 115 ++---
 .../PerformanceStatisticsReportSelfTest.java   |  95 -
 3 files changed, 173 insertions(+), 39 deletions(-)

diff --git a/modules/performance-statistics-ext/report/js/sqlTab.js 
b/modules/performance-statistics-ext/report/js/sqlTab.js
index 70b2b9c8..de04153f 100644
--- a/modules/performance-statistics-ext/report/js/sqlTab.js
+++ b/modules/performance-statistics-ext/report/js/sqlTab.js
@@ -159,7 +159,7 @@ function buildPropertiesSubTable($el, properties) {
 
 $.each(properties, function (k, prop) {
 data.push({
-name: k,
+name: prop["name"],
 value: prop["value"],
 count: prop["count"]
 });
diff --git 
a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
 
b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
index a8294bd2..435767c3 100644
--- 
a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
+++ 
b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
@@ -46,10 +46,10 @@ import static 
org.apache.ignite.internal.performancestatistics.util.Utils.MAPPER
  *  "logicalReads" : $logicalReads,
  *  "physicalReads" : $physicalReads,
  *  "failures" : $failures,
- *  "properties" : {
- *  $propName : {"value" : $propValue, "count" : $propCount},
+ *  "properties" : [
+ *  {"name" : $propName, "value" : $propValue, "count" : 
$propCount},
  *  ...
- *  },
+ *  ],
  *  "rows" : {
  *  $action : $rowsCount,
  *  ...
@@ -68,10 +68,10 @@ import static 
org.apache.ignite.internal.performancestatistics.util.Utils.MAPPER
  *  "logicalReads" : $logicalReads,
  *  "physicalReads" : $physicalReads,
  *  "success" : $success,
- *  "properties" : {
- *  $propName : {"value" : $propValue, "count" : $propCount},
+ *  "properties" : [
+ *  {"name" : $propName, "value" : $propValue, "count" : $propCount},
  *  ...
- *  },
+ *  ],
  *  "rows" : {
  *  $action : $rowsCount,
  *  ...
@@ -85,6 +85,10 @@ public class QueryHandler implements 
IgnitePerformanceStatisticsHandler {
 private final Map> 
aggrQuery =
 new EnumMap<>(GridCacheQueryType.class);
 
+/**  Queries results: queryType -> nodeId -> queryId -> aggregatedInfo. */
+private final Map>> aggrQryById =
+new EnumMap<>(GridCacheQueryType.class);
+
 /** Parsed reads: queryType -> queryNodeId -> queryId -> reads. */
 private final Map>> 
readsById =
 new EnumMap<>(GridCacheQueryType.class);
@@ -134,6 +138,13 @@ public class QueryHandler implements 
IgnitePerformanceStatisticsHandler {
 long logicalReads,
 long physicalReads
 ) {
+AggregatedQueryInfo info = aggregatedQueryInfoById(type, qryNodeId, 
id);
+
+if (info != null) {
+info.mergeReads(logicalReads, physicalReads);
+return;
+}
+
 Map ids = readsById.computeIfAbsent(type, queryType -> 
new HashMap<>())
 .computeIfAbsent(qryNodeId, node -> new HashMap<>());
 
@@ -152,6 +163,13 @@ public class QueryHandler implements 
IgnitePerformanceStatisticsHandler {
 String action,
 long rows
 ) {
+AggregatedQueryInfo info = aggregatedQueryInfoById(type, qryNodeId, 
id);
+
+if (info != null) {
+info.mergeRows(action.intern(), rows);
+return;
+}
+
 Map actions = rowsById.computeIfAbsent(qryNodeId, node 
-> new HashMap<>())
 .computeIfAbsent(id, qryId -> 

(ignite) branch master updated: IGNITE-21866 SQL Calcite: Add memory quotas control for Cursor.getAll() method - Fixes #11288.

2024-05-30 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 4a8ed5f78cf IGNITE-21866 SQL Calcite: Add memory quotas control for 
Cursor.getAll() method - Fixes #11288.
4a8ed5f78cf is described below

commit 4a8ed5f78cf587e7db7bc42a1d2789f3cd37dade
Author: Aleksey Plekhanov 
AuthorDate: Thu May 30 10:44:03 2024 +0300

IGNITE-21866 SQL Calcite: Add memory quotas control for Cursor.getAll() 
method - Fixes #11288.

Signed-off-by: Aleksey Plekhanov 
---
 .../internal/processors/query/calcite/Query.java   |  7 ++--
 .../query/calcite/exec/ExecutionContext.java   |  7 +---
 .../query/calcite/exec/ExecutionServiceImpl.java   | 13 +--
 .../exec/tracker/ExecutionNodeMemoryTracker.java   | 10 +-
 .../calcite/exec/tracker/ObjectSizeCalculator.java |  9 +
 .../calcite/exec/tracker/QueryMemoryTracker.java   |  8 -
 .../query/calcite/util/ListFieldsQueryCursor.java  | 28 +--
 .../processors/query/calcite/QueryChecker.java | 19 +-
 .../integration/MemoryQuotasIntegrationTest.java   | 40 ++
 9 files changed, 122 insertions(+), 19 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
index 815b593cde2..c6915fbe4b7 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
@@ -34,7 +34,6 @@ import 
org.apache.ignite.internal.processors.query.GridQueryCancel;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.ExchangeService;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.MemoryTracker;
-import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.NoOpMemoryTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.QueryMemoryTracker;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.jetbrains.annotations.Nullable;
@@ -261,10 +260,8 @@ public class Query {
 synchronized (mux) {
 // Query can have multiple fragments, each fragment requests 
memory tracker, but there should be only
 // one memory tracker per query on each node, store it inside 
Query instance.
-if (memoryTracker == null) {
-memoryTracker = quota > 0 || globalMemoryTracker != 
NoOpMemoryTracker.INSTANCE ?
-new QueryMemoryTracker(globalMemoryTracker, quota) : 
NoOpMemoryTracker.INSTANCE;
-}
+if (memoryTracker == null)
+memoryTracker = QueryMemoryTracker.create(globalMemoryTracker, 
quota);
 
 return memoryTracker;
 }
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
index 39a865ea1ba..8627eb8e37c 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
@@ -35,8 +35,6 @@ import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFa
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.ExecutionNodeMemoryTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.IoTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.MemoryTracker;
-import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.NoOpMemoryTracker;
-import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.NoOpRowTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.RowTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.metadata.ColocationGroup;
 import 
org.apache.ignite.internal.processors.query.calcite.metadata.FragmentDescription;
@@ -344,10 +342,7 @@ public class ExecutionContext extends 
AbstractQueryContext implements DataC
 
 /** */
 public  RowTracker createNodeMemoryTracker(long rowOverhead) {
-if (qryMemoryTracker == NoOpMemoryTracker.INSTANCE)
-return NoOpRowTracker.instance();
-else
-return new ExecutionNodeMemoryTracker(qryMemoryTracker, 
rowOverhead);
+return ExecutionNodeMemoryTracker.create(qryMemoryTracker, 
rowOverhead);
 }
 
 /** */
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/qu

(ignite) branch master updated: IGNITE-22028 Java Thin: Implement invoke/invokeAll operations - Fixes #11358.

2024-05-23 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 5c26896d886 IGNITE-22028 Java Thin: Implement invoke/invokeAll 
operations - Fixes #11358.
5c26896d886 is described below

commit 5c26896d886ab6659b4aa303720830e27409877e
Author: Aleksey Plekhanov 
AuthorDate: Fri May 24 00:01:10 2024 +0300

IGNITE-22028 Java Thin: Implement invoke/invokeAll operations - Fixes 
#11358.

Signed-off-by: Aleksey Plekhanov 
---
 .../org/apache/ignite/snippets/JavaThinClient.java |  20 ++
 docs/_docs/thin-client-comparison.csv  |   7 +-
 docs/_docs/thin-clients/java-thin-client.adoc  |  20 ++
 .../java/org/apache/ignite/client/ClientCache.java | 136 
 .../apache/ignite/client/ClientOperationType.java  |  11 +
 .../internal/client/thin/ClientJCacheAdapter.java  |  18 +-
 .../internal/client/thin/ClientOperation.java  |  12 +
 .../internal/client/thin/ClientServerError.java|  11 +
 .../client/thin/ProtocolBitmaskFeature.java|   5 +-
 .../internal/client/thin/TcpClientCache.java   | 158 +
 .../platform/client/ClientBitmaskFeature.java  |   5 +-
 .../platform/client/ClientMessageParser.java   |  14 +
 .../processors/platform/client/ClientStatus.java   |   3 +
 .../client/cache/ClientCacheInvokeAllRequest.java  |  59 
 .../client/cache/ClientCacheInvokeAllResponse.java |  76 +
 .../client/cache/ClientCacheInvokeRequest.java | 154 +
 .../internal/client/thin/BlockingTxOpsTest.java|  27 ++
 .../ignite/internal/client/thin/InvokeTest.java| 355 +
 .../org/apache/ignite/client/ClientTestSuite.java  |   2 +
 19 files changed, 1082 insertions(+), 11 deletions(-)

diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
index b4979acd03d..50bb9cd3f93 100644
--- 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
@@ -521,4 +521,24 @@ public class JavaThinClient {
 private static interface MyService {
 public void myServiceMethod();
 }
+
+void entryProcessor() throws Exception {
+ClientConfiguration clientCfg = new 
ClientConfiguration().setAddresses("127.0.0.1:10800");
+
+try (IgniteClient client = Ignition.startClient(clientCfg)) {
+//tag::entry-processor[]
+ClientCache cache = 
client.getOrCreateCache("myCache");
+cache.invoke(0, new IncrementProcessor());
+//end::entry-processor[]
+}
+}
+
+//tag::entry-processor-class[]
+public class IncrementProcessor implements EntryProcessor {
+@Override public Integer process(MutableEntry entry, 
Object... arguments) {
+entry.setValue(entry.getValue() == null ? 1 : entry.getValue() + 
1);
+return entry.getValue();
+}
+}
+//end::entry-processor-class[]
 }
diff --git a/docs/_docs/thin-client-comparison.csv 
b/docs/_docs/thin-client-comparison.csv
index 1c9bd884543..aa42639dfb8 100644
--- a/docs/_docs/thin-client-comparison.csv
+++ b/docs/_docs/thin-client-comparison.csv
@@ -1,7 +1,7 @@
 Thin Client Feature,Java,.NET,C++,Python,Node.js,PHP
-Scan Query,{yes},{yes},No,{yes},{yes},{yes}
+Scan Query,{yes},{yes},{yes},{yes},{yes},{yes}
 Scan Query with a filter,{yes},{yes},No,No,No,No
-SqlFieldsQuery,{yes},{yes},No,{yes},{yes},{yes}
+SqlFieldsQuery,{yes},{yes},{yes},{yes},{yes},{yes}
 Binary Object API,{yes},{yes},No,No,{yes},{yes}
 Failover,{yes},{yes},{yes},{yes},{yes},{yes}
 Async Operations,{yes},{yes},No,{yes},{yes},{yes}
@@ -16,4 +16,5 @@ Service invocation,{yes},{yes},No,No,No,No
 Server Discovery,{yes},{yes},No,No,No,No
 Server Discovery in Kubernetes,{yes},No,No,No,No,No
 Data Streamer,No,{Yes},No,No,No,No
-Retry Policy,{yes},{yes},No,No,No,No
\ No newline at end of file
+Retry Policy,{yes},{yes},No,No,No,No
+Entry processor invocation,{yes},No,No,No,No,No
\ No newline at end of file
diff --git a/docs/_docs/thin-clients/java-thin-client.adoc 
b/docs/_docs/thin-clients/java-thin-client.adoc
index 5a744d545c4..dcc6ac5a5ac 100644
--- a/docs/_docs/thin-clients/java-thin-client.adoc
+++ b/docs/_docs/thin-clients/java-thin-client.adoc
@@ -150,6 +150,26 @@ The following code snippet demonstrates how to execute 
basic cache operations fr
 include::{sourceCodeFile}[tag=key-value-operations,indent=0]
 ---
 
+=== Entry Processor
+
+An entry processor is used to process cache entries on the nodes where they 
are stored. An entry processor does not require the ent

(ignite) branch master updated: IGNITE-21225 Fix redundant lambda object allocation in ClockPageReplacementFlags#setFlag - Fixes #11170.

2024-05-23 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new b1b76e04836 IGNITE-21225 Fix redundant lambda object allocation in 
ClockPageReplacementFlags#setFlag - Fixes #11170.
b1b76e04836 is described below

commit b1b76e0483606146b607da69ac437ba9f1f07c54
Author: Aleksey Plekhanov 
AuthorDate: Thu May 23 23:48:32 2024 +0300

IGNITE-21225 Fix redundant lambda object allocation in 
ClockPageReplacementFlags#setFlag - Fixes #11170.

Signed-off-by: Aleksey Plekhanov 
---
 .../cache/persistence/pagemem/ClockPageReplacementFlags.java   | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/ClockPageReplacementFlags.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/ClockPageReplacementFlags.java
index a5f783a973a..a9e57b06f15 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/ClockPageReplacementFlags.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/ClockPageReplacementFlags.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache.persistence.pagemem;
 
-import java.util.function.LongUnaryOperator;
+import java.util.function.LongBinaryOperator;
 import org.apache.ignite.configuration.PageReplacementMode;
 import org.apache.ignite.internal.util.GridUnsafe;
 
@@ -109,7 +109,7 @@ public class ClockPageReplacementFlags {
  * @param pageIdx Page index.
  */
 public void clearFlag(int pageIdx) {
-compareAndSwapFlag(pageIdx, flags -> flags & ~(1L << pageIdx));
+compareAndSwapFlag(pageIdx, (flags, idx) -> flags & ~(1L << idx));
 }
 
 /**
@@ -118,7 +118,7 @@ public class ClockPageReplacementFlags {
  * @param pageIdx Page index.
  */
 public void setFlag(int pageIdx) {
-compareAndSwapFlag(pageIdx, flags -> flags | (1L << pageIdx));
+compareAndSwapFlag(pageIdx, (flags, idx) -> flags | (1L << idx));
 }
 
 /**
@@ -127,7 +127,7 @@ public class ClockPageReplacementFlags {
  * @param pageIdx Page index.
  * @param func Function to apply to flags.
  */
-private void compareAndSwapFlag(int pageIdx, LongUnaryOperator func) {
+private void compareAndSwapFlag(int pageIdx, LongBinaryOperator func) {
 long ptr = flagsPtr + ((pageIdx >> 3) & (~7L));
 
 long oldFlags;
@@ -135,7 +135,7 @@ public class ClockPageReplacementFlags {
 
 do {
 oldFlags = GridUnsafe.getLong(ptr);
-newFlags = func.applyAsLong(oldFlags);
+newFlags = func.applyAsLong(oldFlags, pageIdx);
 
 if (oldFlags == newFlags)
 return;



(ignite) branch master updated: IGNITE-21823 Add proper logging of default pageSize (#11355)

2024-05-23 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 98f200ad692 IGNITE-21823 Add proper logging of default pageSize 
(#11355)
98f200ad692 is described below

commit 98f200ad692c6a67cc75a00789f4b6fbeb746caf
Author: Andrey N 
AuthorDate: Thu May 23 23:43:01 2024 +0300

IGNITE-21823 Add proper logging of default pageSize (#11355)
---
 .../processors/cache/persistence/GridCacheDatabaseSharedManager.java  | 3 +++
 .../cache/persistence/IgniteCacheDatabaseSharedManager.java   | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index a33615135cd..24e3e5591fd 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -1317,6 +1317,8 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 
 if (anyIdxPartFile != null) {
 
memCfg.setPageSize(resolvePageSizeFromPartitionFile(anyIdxPartFile));
+log.info("The DataStorageConfiguration.pageSize property 
has been restored from persistence to: "
++ memCfg.getPageSize() + " bytes");
 
 return;
 }
@@ -1328,6 +1330,7 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 }
 
 memCfg.setPageSize(DataStorageConfiguration.DFLT_PAGE_SIZE);
+log.info("The DataStorageConfiguration.pageSize property has been 
set to: " + memCfg.getPageSize() + " bytes");
 }
 }
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
index 5b29129e96a..baeff9954fa 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
@@ -672,8 +672,10 @@ public class IgniteCacheDatabaseSharedManager extends 
GridCacheSharedManagerAdap
  * @param memCfg Memory config.
  */
 protected void checkPageSize(DataStorageConfiguration memCfg) {
-if (memCfg.getPageSize() == 0)
+if (memCfg.getPageSize() == 0) {
 memCfg.setPageSize(DFLT_PAGE_SIZE);
+log.info("The DataStorageConfiguration.pageSize property has been 
set to: " + memCfg.getPageSize() + " bytes");
+}
 }
 
 /**



(ignite) branch master updated: IGNITE-22101 Fix performance drop for thin client cache operations - Fixes #11328.

2024-05-08 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 123127a3a65 IGNITE-22101 Fix performance drop for thin client cache 
operations - Fixes #11328.
123127a3a65 is described below

commit 123127a3a6522d66d351ee4fd5a8c6393b4f37e1
Author: Aleksey Plekhanov 
AuthorDate: Wed May 8 09:19:31 2024 +0300

IGNITE-22101 Fix performance drop for thin client cache operations - Fixes 
#11328.

Signed-off-by: Aleksey Plekhanov 
---
 .../platform/client/ClientRequestHandler.java  | 24 +-
 .../internal/client/thin/BlockingTxOpsTest.java|  2 +-
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientRequestHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientRequestHandler.java
index ecbf9567ea9..56b6636e296 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientRequestHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientRequestHandler.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.platform.client;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteIllegalStateException;
 import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.binary.BinaryWriterExImpl;
 import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode;
@@ -45,6 +46,9 @@ import static 
org.apache.ignite.internal.processors.platform.client.ClientProtoc
  * Thin client request handler.
  */
 public class ClientRequestHandler implements ClientListenerRequestHandler {
+/** Timeout to wait for async requests completion, to handle them as 
regular sync requests. */
+private static final long ASYNC_REQUEST_WAIT_TIMEOUT_MILLIS = 10L;
+
 /** Client context. */
 private final ClientConnectionContext ctx;
 
@@ -118,17 +122,17 @@ public class ClientRequestHandler implements 
ClientListenerRequestHandler {
 if (req0.isAsync(ctx)) {
 IgniteInternalFuture fut = req0.processAsync(ctx);
 
-if (fut.isDone()) {
-try {
-// Some async operations can be already finished after 
processAsync. Shortcut for this case.
-return fut.get();
-}
-catch (IgniteCheckedException e) {
-throw new IgniteClientException(ClientStatus.FAILED, 
e.getMessage(), e);
-}
+try {
+// Give request a chance to be executed and response processed 
by the current thread,
+// so we can avoid any performance drops caused by async 
requests execution.
+return fut.get(ASYNC_REQUEST_WAIT_TIMEOUT_MILLIS);
+}
+catch (IgniteFutureTimeoutCheckedException ignored) {
+return new ClientAsyncResponse(req0.requestId(), fut);
+}
+catch (IgniteCheckedException e) {
+throw new IgniteClientException(ClientStatus.FAILED, 
e.getMessage(), e);
 }
-
-return new ClientAsyncResponse(req0.requestId(), fut);
 }
 else
 return req0.process(ctx);
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/client/thin/BlockingTxOpsTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/client/thin/BlockingTxOpsTest.java
index 833767ea21a..0b242d393cb 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/client/thin/BlockingTxOpsTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/client/thin/BlockingTxOpsTest.java
@@ -245,7 +245,7 @@ public class BlockingTxOpsTest extends 
AbstractThinClientTest {
 init.run();
 
 GridTestUtils.runMultiThreaded(() -> {
-for (int i = 0; i < 100; i++) {
+for (int i = 0; i < 50; i++) {
 // Mix implicit and explicit transactions.
 if (ThreadLocalRandom.current().nextBoolean()) {
 while (true) {



(ignite) branch master updated: IGNITE-22168 Fix fieldsCount in TcpCommunication messages - Fixes #11339.

2024-05-07 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 78c097069bd IGNITE-22168 Fix fieldsCount in TcpCommunication messages 
- Fixes #11339.
78c097069bd is described below

commit 78c097069bd166d9c6d7e275ddb47ae1033a6ccd
Author: Ilya Shishkov 
AuthorDate: Tue May 7 18:37:25 2024 +0300

IGNITE-22168 Fix fieldsCount in TcpCommunication messages - Fixes #11339.

Signed-off-by: Aleksey Plekhanov 
---
 .../distributed/dht/GridDhtTxFinishRequest.java|  2 +-
 .../distributed/dht/GridDhtTxPrepareRequest.java   |  2 +-
 .../cache/distributed/near/GridNearGetRequest.java |  2 +-
 .../distributed/near/GridNearSingleGetRequest.java |  2 +-
 .../distributed/near/GridNearTxFinishRequest.java  |  2 +-
 .../snapshot/SnapshotFilesRequestMessage.java  | 84 +++---
 .../cache/query/GridCacheQueryRequest.java |  2 +-
 .../cache/query/GridCacheQueryResponse.java|  2 +-
 ...tractCommunicationMessageSerializationTest.java |  9 +++
 .../query/h2/twostep/msg/GridH2QueryRequest.java   |  2 +-
 10 files changed, 58 insertions(+), 51 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index 3b19de525e8..151f5dd6fcd 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -492,7 +492,7 @@ public class GridDhtTxFinishRequest extends 
GridDistributedTxFinishRequest {
 
 /** {@inheritDoc} */
 @Override public byte fieldsCount() {
-return 29;
+return 28;
 }
 
 /** {@inheritDoc} */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index 649392fe03c..c2f70cfe4e4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -634,7 +634,7 @@ public class GridDhtTxPrepareRequest extends 
GridDistributedTxPrepareRequest {
 
 /** {@inheritDoc} */
 @Override public byte fieldsCount() {
-return 36;
+return 35;
 }
 
 /** {@inheritDoc} */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
index b200babb626..2fa955abbdd 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@ -530,7 +530,7 @@ public class GridNearGetRequest extends GridCacheIdMessage 
implements GridCacheD
 
 /** {@inheritDoc} */
 @Override public byte fieldsCount() {
-return 16;
+return 15;
 }
 
 /** {@inheritDoc} */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
index a503e7e24a7..834ccb13463 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
@@ -432,7 +432,7 @@ public class GridNearSingleGetRequest extends 
GridCacheIdMessage implements Grid
 
 /** {@inheritDoc} */
 @Override public byte fieldsCount() {
-return 13;
+return 12;
 }
 
 /** {@inheritDoc} */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index 652e1172285..faeb19dcc0b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -209,7 +209,7 @@ public class GridNearTxFinishRequest extends

(ignite) branch master updated: IGNITE-22069 Optimize persistent entries expiration - Fixes #11319.

2024-04-27 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new b9644393603 IGNITE-22069 Optimize persistent entries expiration - 
Fixes #11319.
b9644393603 is described below

commit b96443936038a0fece129a6112ece79964473f83
Author: Aleksey Plekhanov 
AuthorDate: Sat Apr 27 10:43:53 2024 +0300

IGNITE-22069 Optimize persistent entries expiration - Fixes #11319.

Signed-off-by: Aleksey Plekhanov 
---
 .../jmh/cache/JmhCacheExpireBenchmark.java |  16 ++-
 .../internal/processors/cache/GridCacheUtils.java  |  10 --
 .../cache/IgniteCacheOffheapManagerImpl.java   |  48 +
 .../cache/persistence/GridCacheOffheapManager.java |  73 +++--
 .../cache/persistence/tree/BPlusTree.java  |  37 +--
 .../cache/transactions/TransactionProxyImpl.java   |  13 ++-
 .../processors/cache/tree/PendingEntriesTree.java  |  12 +++
 .../cache/GridCacheTtlManagerSelfTest.java |  27 +
 .../expiry/IgniteCacheExpiryPolicyTestSuite.java   |   3 +-
 .../cache/expiry/PendingTreeCleaningTest.java  | 118 +
 10 files changed, 281 insertions(+), 76 deletions(-)

diff --git 
a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheExpireBenchmark.java
 
b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheExpireBenchmark.java
index 4c25bbc12b4..79b9bf12a78 100644
--- 
a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheExpireBenchmark.java
+++ 
b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheExpireBenchmark.java
@@ -24,7 +24,10 @@ import javax.cache.expiry.Duration;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
+import org.apache.ignite.cluster.ClusterState;
 import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.annotations.BenchmarkMode;
@@ -33,6 +36,7 @@ import org.openjdk.jmh.annotations.Level;
 import org.openjdk.jmh.annotations.Measurement;
 import org.openjdk.jmh.annotations.Mode;
 import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Param;
 import org.openjdk.jmh.annotations.Scope;
 import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
@@ -66,6 +70,10 @@ public class JmhCacheExpireBenchmark {
 /** Cache with expire policy. */
 private IgniteCache cacheExp;
 
+/** Persistence enabled. */
+@Param({"FALSE", "TRUE"})
+private String persistence;
+
 /** */
 @Benchmark
 public void putWithExpire() {
@@ -87,7 +95,13 @@ public class JmhCacheExpireBenchmark {
  */
 @Setup(Level.Trial)
 public void setup() {
-ignite = Ignition.start(new 
IgniteConfiguration().setIgniteInstanceName("test"));
+ignite = Ignition.start(new 
IgniteConfiguration().setIgniteInstanceName("test")
+.setDataStorageConfiguration(new 
DataStorageConfiguration().setDefaultDataRegionConfiguration(
+new 
DataRegionConfiguration().setPersistenceEnabled(Boolean.parseBoolean(persistence))
+))
+);
+
+ignite.cluster().state(ClusterState.ACTIVE);
 
 cacheReg = ignite.getOrCreateCache(new 
CacheConfiguration<>("CACHE_REG"));
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index dd87b339ed3..0a12ac3959c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -860,16 +860,6 @@ public class GridCacheUtils {
 ctx.ttl().expire(TTL_BATCH_SIZE);
 }
 
-/**
- * @param ctx Shared cache context.
- */
-public static  void unwindEvicts(GridCacheSharedContext ctx) {
-assert ctx != null;
-
-for (GridCacheContext cacheCtx : ctx.cacheContexts())
-unwindEvicts(cacheCtx);
-}
-
 /**
  * @param asc {@code True} for ascending.
  * @return Descending order comparator.
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index c1f23ebe791..edfe8d0bc75 100644
--- 
a/modules/core/s

(ignite) branch master updated: IGNITE-21961 Fix entries cleaning on node shutdown/deactivation for in-memory mode - Fixes #11302.

2024-04-12 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 327df73416b IGNITE-21961 Fix entries cleaning on node 
shutdown/deactivation for in-memory mode - Fixes #11302.
327df73416b is described below

commit 327df73416b310fc1704f24507df864c1632306f
Author: Aleksey Plekhanov 
AuthorDate: Fri Apr 12 09:57:13 2024 +0300

IGNITE-21961 Fix entries cleaning on node shutdown/deactivation for 
in-memory mode - Fixes #11302.

Signed-off-by: Aleksey Plekhanov 
---
 .../cache/IgniteCacheOffheapManagerImpl.java   |  19 +++
 .../cache/EntriesRemoveOnShutdownTest.java | 137 +
 .../ignite/testsuites/IgniteCacheTestSuite13.java  |   2 +
 3 files changed, 158 insertions(+)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index 754a880..9ba25c751b9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -37,8 +37,11 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cluster.ClusterState;
 import org.apache.ignite.failure.FailureContext;
 import org.apache.ignite.failure.FailureType;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.GridKernalState;
 import org.apache.ignite.internal.NodeStoppingException;
 import org.apache.ignite.internal.pagemem.FullPageId;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
@@ -197,6 +200,22 @@ public class IgniteCacheOffheapManagerImpl implements 
IgniteCacheOffheapManager
 
 /** {@inheritDoc} */
 @Override public void stop() {
+GridKernalContext kctx = ctx.kernalContext();
+
+// For in-memory mode, if we stop caches on grid stopping or cluster 
deactivation, skip data deletion from
+// the trees and just close trees to release resources.
+if (kctx.gateway().getState() == GridKernalState.STOPPING
+|| kctx.state().clusterState().state() == ClusterState.INACTIVE) {
+for (CacheDataStore store : cacheDataStores())
+store.tree().close();
+
+if (pendingEntries != null)
+pendingEntries.close();
+
+return;
+}
+
+// In other cases (cache stop, for example) perform destroy with data 
deletion (through tree iteration).
 try {
 for (CacheDataStore store : cacheDataStores())
 destroyCacheDataStore(store);
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntriesRemoveOnShutdownTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntriesRemoveOnShutdownTest.java
new file mode 100644
index 000..25e1211e2ed
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntriesRemoveOnShutdownTest.java
@@ -0,0 +1,137 @@
+/*
+ * 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.processors.cache;
+
+import java.util.Collection;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.run

(ignite) branch master updated: IGNITE-21183 Thin client: Fix client-connector threads blocking by transactional operations - Fixes #11176.

2024-04-12 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 30ed7b9a66a IGNITE-21183 Thin client: Fix client-connector threads 
blocking by transactional operations - Fixes #11176.
30ed7b9a66a is described below

commit 30ed7b9a66a225a2fae3042298ae85f5eb6ae207
Author: Aleksey Plekhanov 
AuthorDate: Fri Apr 12 09:51:06 2024 +0300

IGNITE-21183 Thin client: Fix client-connector threads blocking by 
transactional operations - Fixes #11176.

Signed-off-by: Aleksey Plekhanov 
---
 .../processors/cache/GridCacheAdapter.java | 281 
 .../processors/cache/GridCacheSharedContext.java   |  44 ++-
 .../cache/distributed/near/GridNearTxLocal.java|   2 +-
 .../IgniteTxImplicitSingleStateImpl.java   |  15 +-
 .../cache/transactions/IgniteTxLocalState.java |  10 +
 .../cache/transactions/IgniteTxManager.java|   4 +-
 .../transactions/IgniteTxRemoteStateAdapter.java   |  10 -
 .../cache/transactions/IgniteTxState.java  |  11 -
 .../cache/transactions/IgniteTxStateImpl.java  |  27 +-
 .../processors/odbc/ClientAsyncResponse.java   |  89 +
 .../ClientListenerAsyncResponse.java}  |  40 +--
 .../processors/odbc/ClientListenerNioListener.java |  81 +++--
 .../processors/odbc/ClientListenerResponse.java|   4 +-
 .../processors/platform/client/ClientRequest.java  |  18 +
 .../platform/client/ClientRequestHandler.java  |  31 +-
 .../client/cache/ClientCacheClearKeyRequest.java   |   7 +-
 .../client/cache/ClientCacheClearKeysRequest.java  |   7 +-
 .../cache/ClientCacheContainsKeyRequest.java   |   7 +-
 .../cache/ClientCacheContainsKeysRequest.java  |   7 +-
 .../client/cache/ClientCacheDataRequest.java   |  27 +-
 .../client/cache/ClientCacheGetAllRequest.java |   9 +-
 .../cache/ClientCacheGetAndPutIfAbsentRequest.java |   8 +-
 .../client/cache/ClientCacheGetAndPutRequest.java  |   7 +-
 .../cache/ClientCacheGetAndRemoveRequest.java  |   7 +-
 .../cache/ClientCacheGetAndReplaceRequest.java |   7 +-
 .../cache/ClientCacheGetConfigurationRequest.java  |   3 +-
 .../client/cache/ClientCacheGetRequest.java|   7 +-
 .../client/cache/ClientCacheIndexQueryRequest.java |   2 +-
 .../client/cache/ClientCacheKeyRequest.java|  32 +-
 .../client/cache/ClientCacheKeysRequest.java   |   8 +
 .../client/cache/ClientCacheLocalPeekRequest.java  |   6 +-
 .../client/cache/ClientCachePutAllRequest.java |  14 +-
 .../cache/ClientCachePutIfAbsentRequest.java   |   7 +-
 .../client/cache/ClientCachePutRequest.java|   7 +-
 .../client/cache/ClientCacheRemoveAllRequest.java  |  13 +
 .../cache/ClientCacheRemoveIfEqualsRequest.java|   7 +-
 .../client/cache/ClientCacheRemoveKeyRequest.java  |   7 +-
 .../client/cache/ClientCacheRemoveKeysRequest.java |   7 +-
 .../cache/ClientCacheReplaceIfEqualsRequest.java   |   7 +-
 .../client/cache/ClientCacheReplaceRequest.java|   7 +-
 .../platform/client/cache/ClientCacheRequest.java  |   8 +-
 .../client/cache/ClientCacheScanQueryRequest.java  |   3 +-
 .../client/cache/ClientCacheSqlQueryRequest.java   |   2 +-
 .../platform/client/tx/ClientTxEndRequest.java |  36 +-
 .../internal/client/thin/BlockingTxOpsTest.java| 373 +
 .../org/apache/ignite/client/ClientTestSuite.java  |   4 +-
 46 files changed, 943 insertions(+), 377 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 876bc264f96..c3ab16eb179 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -37,7 +37,6 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.SortedSet;
 import java.util.UUID;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Semaphore;
@@ -52,7 +51,6 @@ import javax.cache.processor.EntryProcessorException;
 import javax.cache.processor.EntryProcessorResult;
 import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
@@ -74,7 +72,6 @@ import org.apache.ignite.compute.ComputeJobResult;
 import org.apache.ignite.compute.ComputeJobResultPolicy;
 import org.apache.ignite.compute.ComputeTaskAdapter;
 import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
 import

(ignite) branch master updated: IGNITE-21929 Fix pending tree extra cleanup on entries expiration - Fixes #11300.

2024-04-05 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 2ccb962aded IGNITE-21929 Fix pending tree extra cleanup on entries 
expiration - Fixes #11300.
2ccb962aded is described below

commit 2ccb962adedbae93c521776a2f62307d2e8b21b7
Author: Yuri Naryshkin 
AuthorDate: Fri Apr 5 10:46:21 2024 +0300

IGNITE-21929 Fix pending tree extra cleanup on entries expiration - Fixes 
#11300.

Signed-off-by: Aleksey Plekhanov 
---
 .../apache/ignite/internal/binary/BinaryUtils.java |  23 +
 .../cache/IgniteCacheOffheapManagerImpl.java   |  37 ++-
 .../cache/GridCacheTtlManagerSelfTest.java | 111 +
 3 files changed, 148 insertions(+), 23 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java 
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
index f513d3ddd2f..72790b94317 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
@@ -67,13 +67,7 @@ import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.binary.Binarylizable;
 import org.apache.ignite.internal.binary.builder.BinaryLazyValue;
 import org.apache.ignite.internal.binary.streams.BinaryInputStream;
-import org.apache.ignite.internal.processors.cache.CacheObjectByteArrayImpl;
-import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
-import org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl;
-import 
org.apache.ignite.internal.processors.cacheobject.PlatformCacheObjectImpl;
-import 
org.apache.ignite.internal.processors.cacheobject.UserCacheObjectByteArrayImpl;
-import org.apache.ignite.internal.processors.cacheobject.UserCacheObjectImpl;
-import 
org.apache.ignite.internal.processors.cacheobject.UserKeyCacheObjectImpl;
+import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.util.MutableSingletonList;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -738,20 +732,7 @@ public class BinaryUtils {
  * @return True if this is an object of a known type.
  */
 public static boolean knownCacheObject(Object obj) {
-if (obj == null)
-return false;
-
-Class cls = obj.getClass();
-
-return cls == KeyCacheObjectImpl.class ||
-cls == BinaryObjectImpl.class ||
-cls == CacheObjectImpl.class ||
-cls == CacheObjectByteArrayImpl.class ||
-cls == BinaryEnumObjectImpl.class ||
-cls == UserKeyCacheObjectImpl.class ||
-cls == UserCacheObjectImpl.class ||
-cls == PlatformCacheObjectImpl.class ||
-cls == UserCacheObjectByteArrayImpl.class;
+return obj instanceof CacheObject;
 }
 
 /**
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index dbb2a3601ca..754a880 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -1138,7 +1138,8 @@ public class IgniteCacheOffheapManagerImpl implements 
IgniteCacheOffheapManager
 if (obsoleteVer == null)
 obsoleteVer = cctx.cache().nextVersion();
 
-GridCacheEntryEx entry = cctx.cache().entryEx(row.key);
+GridCacheEntryEx entry = cctx.cache().entryEx(row.key 
instanceof KeyCacheObjectImpl
+? new 
ExpiredKeyCacheObject((KeyCacheObjectImpl)row.key, row.expireTime, row.link) : 
row.key);
 
 if (entry != null)
 c.apply(entry, obsoleteVer);
@@ -1718,7 +1719,11 @@ public class IgniteCacheOffheapManagerImpl implements 
IgniteCacheOffheapManager
  */
 private void finishRemove(GridCacheContext cctx, KeyCacheObject key, 
@Nullable CacheDataRow oldRow) throws IgniteCheckedException {
 if (oldRow != null) {
-clearPendingEntries(cctx, oldRow);
+if (!(key instanceof ExpiredKeyCacheObject)
+|| ((ExpiredKeyCacheObject)key).expireTime != 
oldRow.expireTime()
+|| ((ExpiredKeyCacheObject)key).link != oldRow.link()
+)
+clearPendingEntries(cctx, oldRow);
 
 decrementSize(cctx.cacheId());
 }
@@ -1977,4 +1982,32 @@ public class IgniteCacheOffheapManagerImpl implements

(ignite) branch master updated: IGNITE-21886 Refactor CompressionProcessorImpl, move code partially to ignite-core module - Fixes #11290.

2024-04-05 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 0024e37136c IGNITE-21886 Refactor CompressionProcessorImpl, move code 
partially to ignite-core module - Fixes #11290.
0024e37136c is described below

commit 0024e37136c6da493da09830f1fe3c729753952d
Author: Aleksey Plekhanov 
AuthorDate: Fri Apr 5 10:03:08 2024 +0300

IGNITE-21886 Refactor CompressionProcessorImpl, move code partially to 
ignite-core module - Fixes #11290.

Signed-off-by: Aleksey Plekhanov 
---
 .../compress/CompressionProcessorImpl.java | 229 -
 .../persistence/wal/FileWriteAheadLogManager.java  |  10 +-
 .../processors/compress/CompressionHandler.java|   4 +-
 .../processors/compress/CompressionProcessor.java  | 208 ++-
 .../wal/WalPageRecordCompactionTest.java   |  86 
 .../ignite/testsuites/IgnitePdsTestSuite5.java |   2 +
 6 files changed, 330 insertions(+), 209 deletions(-)

diff --git 
a/modules/compress/src/main/java/org/apache/ignite/internal/processors/compress/CompressionProcessorImpl.java
 
b/modules/compress/src/main/java/org/apache/ignite/internal/processors/compress/CompressionProcessorImpl.java
index 8fbfc44949a..831511b1b08 100644
--- 
a/modules/compress/src/main/java/org/apache/ignite/internal/processors/compress/CompressionProcessorImpl.java
+++ 
b/modules/compress/src/main/java/org/apache/ignite/internal/processors/compress/CompressionProcessorImpl.java
@@ -30,9 +30,7 @@ import org.apache.ignite.IgniteException;
 import org.apache.ignite.configuration.DiskPageCompression;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.ThreadLocalDirectByteBuffer;
-import org.apache.ignite.internal.pagemem.PageUtils;
 import 
org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIO;
-import 
org.apache.ignite.internal.processors.cache.persistence.tree.io.CompactablePageIO;
 import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO;
 import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -41,16 +39,12 @@ import org.xerial.snappy.Snappy;
 import static java.nio.file.StandardOpenOption.CREATE;
 import static java.nio.file.StandardOpenOption.WRITE;
 import static 
org.apache.ignite.configuration.DataStorageConfiguration.MAX_PAGE_SIZE;
-import static org.apache.ignite.configuration.DiskPageCompression.SKIP_GARBAGE;
 import static org.apache.ignite.internal.util.GridUnsafe.NATIVE_BYTE_ORDER;
 
 /**
  * Compression processor.
  */
 public class CompressionProcessorImpl extends CompressionProcessor {
-/** Max page size. */
-private final ThreadLocalDirectByteBuffer compactBuf = new 
ThreadLocalDirectByteBuffer(MAX_PAGE_SIZE, NATIVE_BYTE_ORDER);
-
 /** A bit more than max page size, extra space is required by compressors. 
*/
 private final ThreadLocalDirectByteBuffer compressBuf =
 new 
ThreadLocalDirectByteBuffer(maxCompressedBufferSize(MAX_PAGE_SIZE), 
NATIVE_BYTE_ORDER);
@@ -92,84 +86,6 @@ public class CompressionProcessorImpl extends 
CompressionProcessor {
 checkPunchHole(storagePath, fsBlockSize);
 }
 
-/** {@inheritDoc} */
-@Override public ByteBuffer compressPage(
-ByteBuffer page,
-int pageSize,
-int blockSize,
-DiskPageCompression compression,
-int compressLevel
-) throws IgniteCheckedException {
-assert compression != null && compression != 
DiskPageCompression.DISABLED : compression;
-assert U.isPow2(blockSize) : blockSize;
-assert page.position() == 0 && page.limit() >= pageSize;
-
-int oldPageLimit = page.limit();
-
-try {
-// Page size will be less than page limit when TDE is enabled. To 
make compaction and compression work
-// correctly we need to set limit to real page size.
-page.limit(pageSize);
-
-ByteBuffer compactPage = doCompactPage(page, pageSize);
-
-int compactSize = compactPage.limit();
-
-assert compactSize <= pageSize : compactSize;
-
-// If no need to compress further or configured just to skip 
garbage.
-if (compactSize < blockSize || compression == SKIP_GARBAGE)
-return setCompactionInfo(compactPage, compactSize);
-
-ByteBuffer compressedPage = doCompressPage(compression, 
compactPage, compactSize, compressLevel);
-
-assert compressedPage.position() == 0;
-int compressedSize = compressedPage.limit();
-
-int freeCompactBlocks = (pageSize - compactSize) / blockSize;
-int freeCompressedBlocks = (pageSize - compressedSize) / blockSize;
-
-if (freeCompactBlock

(ignite-extensions) branch master updated: IGNITE-21863 Reduce memory consumption by performance statistics QueryHandler (#258)

2024-03-29 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
 new 8f901406 IGNITE-21863 Reduce memory consumption by performance 
statistics QueryHandler (#258)
8f901406 is described below

commit 8f901406b336d4a4c66ed102e4b022a69baaddd7
Author: Aleksey Plekhanov 
AuthorDate: Fri Mar 29 16:34:25 2024 +0300

IGNITE-21863 Reduce memory consumption by performance statistics 
QueryHandler (#258)
---
 .../handlers/QueryHandler.java | 182 -
 .../util/OrderedFixedSizeStructure.java|  13 +-
 2 files changed, 112 insertions(+), 83 deletions(-)

diff --git 
a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
 
b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
index d702772d..a8294bd2 100644
--- 
a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
+++ 
b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
@@ -20,9 +20,7 @@ package 
org.apache.ignite.internal.performancestatistics.handlers;
 import java.util.Collection;
 import java.util.EnumMap;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 import java.util.TreeMap;
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
@@ -102,27 +100,42 @@ public class QueryHandler implements 
IgnitePerformanceStatisticsHandler {
 new EnumMap<>(GridCacheQueryType.class);
 
 /** {@inheritDoc} */
-@Override public void query(UUID nodeId, GridCacheQueryType type, String 
text, long id, long startTime,
-long duration, boolean success) {
-Query query = new Query(type, text, nodeId, id, startTime, duration, 
success);
+@Override public void query(
+UUID nodeId,
+GridCacheQueryType type,
+String text,
+long id,
+long startTime,
+long duration,
+boolean success
+) {
+Query qry = new Query(type, text, nodeId, id, startTime, duration, 
success);
 
 OrderedFixedSizeStructure tree = 
topSlow.computeIfAbsent(type,
 queryType -> new OrderedFixedSizeStructure<>());
 
-tree.put(duration, query);
-
 AggregatedQueryInfo info = aggrQuery.computeIfAbsent(type, queryType 
-> new HashMap<>())
 .computeIfAbsent(text, queryText -> new AggregatedQueryInfo());
 
-info.merge(nodeId, id, duration, success);
+info.merge(duration, success);
+
+Query evicted = tree.put(duration, qry);
+
+if (evicted != null)
+aggregateQuery(evicted);
 }
 
 /** {@inheritDoc} */
-@Override public void queryReads(UUID nodeId, GridCacheQueryType type, 
UUID queryNodeId, long id, long logicalReads,
-long physicalReads) {
-
+@Override public void queryReads(
+UUID nodeId,
+GridCacheQueryType type,
+UUID qryNodeId,
+long id,
+long logicalReads,
+long physicalReads
+) {
 Map ids = readsById.computeIfAbsent(type, queryType -> 
new HashMap<>())
-.computeIfAbsent(queryNodeId, node -> new HashMap<>());
+.computeIfAbsent(qryNodeId, node -> new HashMap<>());
 
 long[] readsArr = ids.computeIfAbsent(id, queryId -> new long[] {0, 
0});
 
@@ -169,90 +182,105 @@ public class QueryHandler implements 
IgnitePerformanceStatisticsHandler {
 
 /** {@inheritDoc} */
 @Override public Map results() {
-ObjectNode sqlRes = MAPPER.createObjectNode();
-ObjectNode scanRes = MAPPER.createObjectNode();
-ObjectNode indexRes = MAPPER.createObjectNode();
-
-buildResult(GridCacheQueryType.SQL_FIELDS, sqlRes);
-buildResult(GridCacheQueryType.SCAN, scanRes);
-buildResult(GridCacheQueryType.INDEX, indexRes);
-
 ArrayNode topSlowSql = MAPPER.createArrayNode();
 ArrayNode topSlowScan = MAPPER.createArrayNode();
-ArrayNode topSlowIndex = MAPPER.createArrayNode();
+ArrayNode topSlowIdx = MAPPER.createArrayNode();
 
 buildTopSlowResult(GridCacheQueryType.SQL_FIELDS, topSlowSql);
 buildTopSlowResult(GridCacheQueryType.SCAN, topSlowScan);
-buildTopSlowResult(GridCacheQueryType.INDEX, topSlowIndex);
+buildTopSlowResult(GridCacheQueryType.INDEX, topSlowIdx);
+
+ObjectNode sqlRes = MAPPER.createObjectNode();
+ObjectNode scanRes = MAPPER.createObjectNode();
+ObjectNode idxRes = MAPPER.createObjectNode();
+
+buildResult(GridCacheQueryType.SQL_FIELDS, sqlRe

(ignite) branch master updated: IGNITE-21478 Fix OOM crash on unstable topology (#11283)

2024-03-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 1c318e166d7 IGNITE-21478 Fix OOM crash on unstable topology (#11283)
1c318e166d7 is described below

commit 1c318e166d7766eee50ad4f373c818e9feb4e79d
Author: yurinaryshkin <135707807+yurinarysh...@users.noreply.github.com>
AuthorDate: Mon Mar 25 17:51:28 2024 +0300

IGNITE-21478 Fix OOM crash on unstable topology (#11283)
---
 .../affinity/GridAffinityAssignmentCache.java  |  7 +-
 .../GridHistoryAffinityAssignmentTest.java | 28 ++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index b4956adc0e8..9b3f1346c96 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -575,7 +575,7 @@ public class GridAffinityAssignmentCache {
 
 Map.Entry 
prevHistEntry = affCache.floorEntry(prevVer);
 
-HistoryAffinityAssignment newHistEntry = (prevHistEntry == null) ?
+HistoryAffinityAssignment newHistEntry = (prevHistEntry == null || 
shouldCleanupShallows()) ?
 new HistoryAffinityAssignmentImpl(assignmentCpy, backups) :
 new 
HistoryAffinityAssignmentShallowCopy(prevHistEntry.getValue().origin(), topVer);
 
@@ -1019,6 +1019,11 @@ public class GridAffinityAssignmentCache {
 return nonShallowSize > MAX_NON_SHALLOW_HIST_SIZE || totalSize > 
MAX_TOTAL_HIST_SIZE;
 }
 
+/** */
+private boolean shouldCleanupShallows() {
+return nonShallowHistSize.get() <= MIN_NON_SHALLOW_HIST_SIZE && 
affCache.size() > MAX_TOTAL_HIST_SIZE;
+}
+
 /**
  * @return All initialized versions.
  */
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridHistoryAffinityAssignmentTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridHistoryAffinityAssignmentTest.java
index 3b4ab3acc4e..80760c3a41a 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridHistoryAffinityAssignmentTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridHistoryAffinityAssignmentTest.java
@@ -129,4 +129,32 @@ public class GridHistoryAffinityAssignmentTest extends 
GridCommonAbstractTest {
 
 return GridTestUtils.getFieldValue(cctx.affinity(), "aff");
 }
+
+/** */
+@Test
+public void testAffinityCacheSizeOnCacheRecreate() throws Exception {
+try (IgniteEx server = startGrid(0)) {
+try (IgniteEx client = startClientGrid()) {
+for (int i = 0; i < 300; i++) {
+client.getOrCreateCache(DEFAULT_CACHE_NAME);
+
+server.context().cache().cacheGroups().forEach(x -> 
assertTrue(x.affinity().cachedVersions().size() < 260));
+
+client.destroyCache(DEFAULT_CACHE_NAME);
+}
+}
+}
+}
+
+/** */
+@Test
+public void testAffinityCacheSizeOnReconnect() throws Exception {
+try (IgniteEx server = startGrid(0)) {
+for (int i = 0; i < 300; i++) {
+try (IgniteEx client = startClientGrid()) {
+server.context().cache().cacheGroups().forEach(x -> 
assertTrue(x.affinity().cachedVersions().size() < 260));
+}
+}
+}
+}
 }



(ignite) branch master updated: IGNITE-21587 SQL Calcite: Add operations authorization (#11278)

2024-03-22 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new db4ac5f5881 IGNITE-21587 SQL Calcite: Add operations authorization 
(#11278)
db4ac5f5881 is described below

commit db4ac5f5881dc2997372b18a2b22ed097b0f1966
Author: Aleksey Plekhanov 
AuthorDate: Fri Mar 22 10:59:52 2024 +0300

IGNITE-21587 SQL Calcite: Add operations authorization (#11278)
---
 .../query/calcite/exec/ExecutionServiceImpl.java   |  48 
 .../query/calcite/exec/QueryTaskExecutorImpl.java  |   9 +-
 .../query/calcite/schema/CacheTableImpl.java   |  22 ++
 .../query/calcite/schema/IgniteTable.java  |  17 ++
 .../query/calcite/schema/SystemViewTableImpl.java  |   5 +
 .../calcite/exec/rel/AbstractExecutionTest.java|   2 +
 .../integration/AuthorizationIntegrationTest.java  | 254 +
 .../query/calcite/planner/PlannerTest.java |   2 +
 .../query/calcite/planner/TestTable.java   |   5 +
 .../ignite/testsuites/IntegrationTestSuite.java|   2 +
 10 files changed, 365 insertions(+), 1 deletion(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
index 835c13ede19..56ac14c372f 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
@@ -28,6 +28,7 @@ import java.util.stream.Collectors;
 import org.apache.calcite.plan.Context;
 import org.apache.calcite.plan.Contexts;
 import org.apache.calcite.plan.RelOptUtil;
+import org.apache.calcite.rel.core.TableModify;
 import org.apache.calcite.sql.SqlInsert;
 import org.apache.calcite.sql.SqlKind;
 import org.apache.calcite.tools.Frameworks;
@@ -88,12 +89,20 @@ import 
org.apache.ignite.internal.processors.query.calcite.prepare.ExplainPlan;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.FieldsMetadataImpl;
 import org.apache.ignite.internal.processors.query.calcite.prepare.Fragment;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.FragmentPlan;
+import 
org.apache.ignite.internal.processors.query.calcite.prepare.IgniteRelShuttle;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.MappingQueryContext;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.MultiStepPlan;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl;
 import org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlan;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCache;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.ddl.CreateTableCommand;
+import 
org.apache.ignite.internal.processors.query.calcite.rel.IgniteIndexBound;
+import 
org.apache.ignite.internal.processors.query.calcite.rel.IgniteIndexCount;
+import org.apache.ignite.internal.processors.query.calcite.rel.IgniteIndexScan;
+import org.apache.ignite.internal.processors.query.calcite.rel.IgniteRel;
+import 
org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableModify;
+import org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableScan;
+import org.apache.ignite.internal.processors.query.calcite.schema.IgniteTable;
 import org.apache.ignite.internal.processors.query.calcite.schema.SchemaHolder;
 import 
org.apache.ignite.internal.processors.query.calcite.type.IgniteTypeFactory;
 import 
org.apache.ignite.internal.processors.query.calcite.util.AbstractService;
@@ -568,6 +577,11 @@ public class ExecutionServiceImpl extends 
AbstractService implements Execut
 
 List fragments = execPlan.fragments();
 
+if (ctx.security().enabled()) {
+for (Fragment fragment : fragments)
+checkPermissions(fragment.root());
+}
+
 // Local execution
 Fragment fragment = F.first(fragments);
 
@@ -741,6 +755,40 @@ public class ExecutionServiceImpl extends 
AbstractService implements Execut
 return new ListFieldsQueryCursor<>(plan, it, ectx);
 }
 
+/** */
+private void checkPermissions(IgniteRel root) {
+IgniteRelShuttle shuttle = new IgniteRelShuttle() {
+@Override public IgniteRel visit(IgniteTableModify rel) {
+return authorize(rel, rel.getOperation() == 
TableModify.Operation.DELETE ?
+IgniteTable.Operation.REMOVE : IgniteTable.Operation.PUT);
+}
+
+@Override public IgniteRel visit(IgniteTableScan rel) {
+return authorize(rel, IgniteTable.Operation.READ);
+}
+
+@Ov

(ignite) branch master updated: IGNITE-21769 [ducktests] Fix dns_failure_test.py to work with the JDK versions greater then 8 (#11279)

2024-03-19 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new e79b654ca4b IGNITE-21769 [ducktests] Fix dns_failure_test.py to work 
with the JDK versions greater then 8 (#11279)
e79b654ca4b is described below

commit e79b654ca4beb848dd9d66c04b88d716e24b7842
Author: Sergey Korotkov 
AuthorDate: Tue Mar 19 18:27:11 2024 +0700

IGNITE-21769 [ducktests] Fix dns_failure_test.py to work with the JDK 
versions greater then 8 (#11279)
---
 modules/ducktests/tests/ignitetest/tests/dns_failure_test.py | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/ducktests/tests/ignitetest/tests/dns_failure_test.py 
b/modules/ducktests/tests/ignitetest/tests/dns_failure_test.py
index 0bfce662d8a..2a9e676a8ad 100644
--- a/modules/ducktests/tests/ignitetest/tests/dns_failure_test.py
+++ b/modules/ducktests/tests/ignitetest/tests/dns_failure_test.py
@@ -27,6 +27,7 @@ from ignitetest.services.utils.ignite_aware import 
IgniteAwareService
 from ignitetest.services.utils.ignite_configuration import 
IgniteConfiguration, DataStorageConfiguration
 from ignitetest.services.utils.ignite_configuration.data_storage import 
DataRegionConfiguration
 from ignitetest.services.utils.ignite_configuration.discovery import 
from_ignite_cluster
+from ignitetest.services.utils.jvm_utils import java_major_version
 from ignitetest.utils import ignite_versions
 from ignitetest.utils.ignite_test import IgniteTest
 from ignitetest.utils.version import IgniteVersion, DEV_BRANCH
@@ -115,7 +116,13 @@ class DnsFailureTest(IgniteTest):
 
 # Note: Support of impl.prefix property was removed since java 18.
 ignite.spec.jvm_opts.append("-Dimpl.prefix=BlockingDns")
-ignite.spec.jvm_opts.append("-Xbootclasspath/a:" + 
":".join(bootclasspath))
+
+java_version = ignite.java_version()
+
+if java_major_version(java_version) > 8:
+ignite.spec.jvm_opts.append("\"--patch-module java.base=" + 
":".join(bootclasspath) + "\"")
+else:
+ignite.spec.jvm_opts.append("-Xbootclasspath/a:" + 
":".join(bootclasspath))
 
 return ignite
 



(ignite) branch master updated: IGNITE-21630 Fix cluster failure on topology change when DNS service is unavailable - Fixes #11260.

2024-03-15 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new f32480505f0 IGNITE-21630 Fix cluster failure on topology change when 
DNS service is unavailable - Fixes #11260.
f32480505f0 is described below

commit f32480505f0b5a827b760789bc724008e68a6f3e
Author: Aleksey Plekhanov 
AuthorDate: Fri Mar 15 09:40:29 2024 +0300

IGNITE-21630 Fix cluster failure on topology change when DNS service is 
unavailable - Fixes #11260.

Signed-off-by: Aleksey Plekhanov 
---
 .../apache/ignite/internal/util/IgniteUtils.java   |  97 +++
 .../java/java/net/BlockingDnsInet4AddressImpl.java |  34 ++
 .../java/java/net/BlockingDnsInet6AddressImpl.java |  34 ++
 .../src/main/java/java/net/DnsBlocker.java |  99 +++
 .../ignitetest/services/utils/ignite_aware.py  |  13 +-
 .../tests/ignitetest/tests/dns_failure_test.py | 136 +
 6 files changed, 331 insertions(+), 82 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java 
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index aabce7ae87d..7ea6899e696 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -9692,67 +9692,7 @@ public abstract class IgniteUtils {
 }
 
 /**
- * Returns tha list of resolved inet addresses. First addresses are 
resolved by host names,
- * if this attempt fails then the addresses are resolved by ip addresses.
- *
- * @param node Grid node.
- * @return Inet addresses for given addresses and host names.
- * @throws IgniteCheckedException If non of addresses can be resolved.
- */
-public static Collection toInetAddresses(ClusterNode node) 
throws IgniteCheckedException {
-return toInetAddresses(node.addresses(), node.hostNames());
-}
-
-/**
- * Returns tha list of resolved inet addresses. First addresses are 
resolved by host names,
- * if this attempt fails then the addresses are resolved by ip addresses.
- *
- * @param addrs Addresses.
- * @param hostNames Host names.
- * @return Inet addresses for given addresses and host names.
- * @throws IgniteCheckedException If non of addresses can be resolved.
- */
-public static Collection toInetAddresses(Collection 
addrs,
-Collection hostNames) throws IgniteCheckedException {
-Set res = new HashSet<>(addrs.size());
-
-Iterator hostNamesIt = hostNames.iterator();
-
-for (String addr : addrs) {
-String hostName = hostNamesIt.hasNext() ? hostNamesIt.next() : 
null;
-
-InetAddress inetAddr = null;
-
-if (!F.isEmpty(hostName)) {
-try {
-inetAddr = InetAddress.getByName(hostName);
-}
-catch (UnknownHostException ignored) {
-}
-}
-
-if (inetAddr == null || inetAddr.isLoopbackAddress()) {
-try {
-inetAddr = InetAddress.getByName(addr);
-}
-catch (UnknownHostException ignored) {
-}
-}
-
-if (inetAddr != null)
-res.add(inetAddr);
-}
-
-if (res.isEmpty())
-throw new IgniteCheckedException("Addresses can not be resolved 
[addr=" + addrs +
-", hostNames=" + hostNames + ']');
-
-return res;
-}
-
-/**
- * Returns tha list of resolved socket addresses. First addresses are 
resolved by host names,
- * if this attempt fails then the addresses are resolved by ip addresses.
+ * Returns the list of resolved socket addresses.
  *
  * @param node Grid node.
  * @param port Port.
@@ -9763,37 +9703,38 @@ public abstract class IgniteUtils {
 }
 
 /**
- * Returns tha list of resolved socket addresses. First addresses are 
resolved by host names,
- * if this attempt fails then the addresses are resolved by ip addresses.
+ * Returns the list of resolved socket addresses.
  *
  * @param addrs Addresses.
  * @param hostNames Host names.
  * @param port Port.
  * @return Socket addresses for given addresses and host names.
  */
-public static Collection 
toSocketAddresses(Collection addrs,
-Collection hostNames, int port) {
+public static Collection toSocketAddresses(
+Collection addrs,
+Collection hostNames,
+int port
+) {
 Set res = new HashSet<>(addrs.size());
 
-Iterator hostNamesIt = hostNames.iterator();
+boolean hasAddr = false;
 
 for (String addr : addrs

(ignite) branch master updated: IGNITE-21162 SQL Calcite: Use table level hints - Fixes #11175.

2024-03-01 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 062d293f766 IGNITE-21162 SQL Calcite: Use table level hints - Fixes 
#11175.
062d293f766 is described below

commit 062d293f766067a24ec76d50827784219715c4ee
Author: Vladimir Steshin 
AuthorDate: Fri Mar 1 21:27:05 2024 +0300

IGNITE-21162 SQL Calcite: Use table level hints - Fixes #11175.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/SQL/sql-calcite.adoc| 39 ++---
 .../query/calcite/hint/HintDefinition.java | 18 ++--
 .../processors/query/calcite/hint/HintUtils.java   | 25 +-
 .../rel/logical/IgniteLogicalTableScan.java|  2 +-
 .../rule/AbstractIgniteJoinConverterRule.java  | 70 ++--
 .../query/calcite/schema/CacheTableImpl.java   |  7 +-
 .../query/calcite/schema/IgniteTable.java  |  9 +-
 .../query/calcite/schema/SystemViewTableImpl.java  |  7 +-
 .../query/calcite/planner/TestTable.java   |  7 +-
 .../planner/hints/ForceIndexHintPlannerTest.java   | 44 ++
 .../planner/hints/JoinTypeHintPlannerTest.java | 98 +++---
 .../planner/hints/NoIndexHintPlannerTest.java  | 44 ++
 12 files changed, 299 insertions(+), 71 deletions(-)

diff --git a/docs/_docs/SQL/sql-calcite.adoc b/docs/_docs/SQL/sql-calcite.adoc
index 90a9a910aa4..ddeaab14640 100644
--- a/docs/_docs/SQL/sql-calcite.adoc
+++ b/docs/_docs/SQL/sql-calcite.adoc
@@ -242,14 +242,16 @@ SQL hints are optional to apply and might be skipped in 
some cases.
 
 
 === Hints format
-SQL hints are defined by a special comment +++/*+ HINT */+++ reffered as a 
_hint block_. Spaces before and after the
-hint name are required. The hint block is placed right after a relation 
operator, often after _SELECT_. Several hint
-blocks for one relation operator *are not allowed*.
+SQL hints are defined by a special comment +++/*+ HINT */+++ reffered as _hint 
block_. Spaces before and after the
+hint name are required. The hint block is placed right after _SELECT_ or after 
a table name. Several hint blocks for
+one _SELECT_ or one table *are not allowed*. Several hints in one hint block 
are separated with comma.
 
 Example:
 [source, SQL]
 
-SELECT /*+ NO_INDEX */ T1.* FROM TBL1 where T1.V1=? and T1.V2=?
+SELECT /*+ FORCE_INDEX(IDX_TBL1_V2), EXPAND_DISTINCT_AGG */ V2, AVG(DISTINCT 
V3) FROM TBL1 WHERE V1=? and V2=? GROUP BY V2
+
+SELECT * FROM TBL1 /*+ FORCE_INDEX(IDX_TBL1_V2) */ where V1=? and V2=?
 
 
 It is allowed to define several hints for the same relation operator. To use 
several hints, separate them by comma
@@ -258,7 +260,7 @@ It is allowed to define several hints for the same relation 
operator. To use sev
 Example:
 [source, SQL]
 
-SELECT /*+ NO_INDEX, EXPAND_DISTINCT_AGG */ SUM(DISTINCT V1), AVG(DISTINCT V2) 
FROM TBL1 GROUP BY V3 WHERE V3=?
+SELECT /*+ NO_INDEX, EXPAND_DISTINCT_AGG */ SUM(DISTINCT V1), AVG(DISTINCT V2) 
FROM TBL1 WHERE V3=? GROUP BY V3
 
 
  Hint parameters
@@ -276,9 +278,9 @@ SELECT /*+ FORCE_INDEX('TBL2_idx1') */ T1.V1, T2.V1 FROM 
TBL1 T1, TBL2 T2 WHERE
 
 
 === Hint scope
-Hints are defined for SELECT relation operator and are "visible" for the 
following operators, queries and subqueries.
-The hints defined in the subquery are "visible" only for this subquery and its 
subqueries. Hint is not "visible" to
-the previous relation operator if it is defined after it.
+Hints of a _SELECT_ are "visible" for this operation and the following 
relation operators, queries and subqueries.
+Hints in a subquery have effective scope only for this subquery and its 
subqueries. Hint, defined for a table, is
+effective only for this table.
 
 Example:
 [source, SQL]
@@ -286,8 +288,9 @@ Example:
 SELECT /*+ NO_INDEX(TBL1_IDX2), FORCE_INDEX(TBL2_IDX2) */ T1.V1 FROM TBL1 T1 
WHERE T1.V2 IN (SELECT T2.V2 FROM TBL2 T2 WHERE T2.V1=? AND T2.V2=?);
 
 SELECT T1.V1 FROM TBL1 T1 WHERE T1.V2 IN (SELECT /*+ FORCE_INDEX(TBL2_IDX2) */ 
T2.V2 FROM TBL2 T2 WHERE T2.V1=? AND T2.V2=?);
-
 
+SELECT T1.V1 FROM TBL1 T1 JOIN TBL2 /*+ MERGE_JOIN */ T2 ON T1.V2=T2.V2 and 
T1.V3=T2.V3 and T2.V3=?;
+
 Note that only the first query has a hint in such a case as:
 [source, SQL]
 
@@ -295,11 +298,23 @@ SELECT /*+ FORCE_INDEX */ V1 FROM TBL1 WHERE V1=? AND V2=?
 UNION ALL
 SELECT V1 FROM TBL1 WHERE V3>?
 
-
 But *there are exceptions*: hints of engine or optimizer level, such as 
link:#hint_disable_rule[_DISABLE_RULE_] or
 link:#hint_query_engine[_QUERY_ENGINE_]. Such hints should be defined at the 
beginning of the query and are related to
 the whole query.
 
+=== Hints priority
+Hints, defined in subqueries or in the following _SELECTs_, have priority over 
the preceding ones. In the following example,
+an ind

(ignite) branch master updated: IGNITE-14317 Fix IgniteCache.removeAsync(key,val) failure inside an optimistic transaction (#11238)

2024-02-08 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 63c4fcac7c8 IGNITE-14317 Fix IgniteCache.removeAsync(key,val) failure 
inside an optimistic transaction (#11238)
63c4fcac7c8 is described below

commit 63c4fcac7c87bcea926b1aa53d4ac3c1526a56f1
Author: Aleksey Plekhanov 
AuthorDate: Thu Feb 8 13:43:44 2024 +0300

IGNITE-14317 Fix IgniteCache.removeAsync(key,val) failure inside an 
optimistic transaction (#11238)
---
 .../org/apache/ignite/common/CacheEventSecurityContextTest.java   | 8 ++--
 .../apache/ignite/internal/processors/cache/GridCacheAdapter.java | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git 
a/modules/clients/src/test/java/org/apache/ignite/common/CacheEventSecurityContextTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/common/CacheEventSecurityContextTest.java
index 6acf6b873b4..83959564f24 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/common/CacheEventSecurityContextTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/common/CacheEventSecurityContextTest.java
@@ -198,9 +198,7 @@ public class CacheEventSecurityContextTest extends 
AbstractEventSecurityContextT
 checkEvents(cli, k -> cache.removeAsync(k).get(), true, 
EVT_CACHE_OBJECT_REMOVED);
 
 checkEvents(cli, k -> cache.remove(k, "val"), true, 
EVT_CACHE_OBJECT_REMOVED);
-
-// TODO Add test case inside transaction after resolving 
IGNITE-14317.
-checkEvents(k -> cache.removeAsync(k, "val").get(), true, 
EVT_CACHE_OBJECT_REMOVED);
+checkEvents(cli, k -> cache.removeAsync(k, "val").get(), true, 
EVT_CACHE_OBJECT_REMOVED);
 
 checkEvents(cli, k -> cache.removeAll(of(k)), true, 
EVT_CACHE_OBJECT_REMOVED);
 checkEvents(cli, k -> cache.removeAllAsync(of(k)).get(), true, 
EVT_CACHE_OBJECT_REMOVED);
@@ -339,9 +337,7 @@ public class CacheEventSecurityContextTest extends 
AbstractEventSecurityContextT
 checkEvents(ignite, k -> cache.removeAsync(k).get(), true, 
EVT_CACHE_OBJECT_REMOVED);
 
 checkEvents(ignite, k -> cache.remove(k, "val"), true, 
EVT_CACHE_OBJECT_REMOVED);
-
-// TODO Add test case inside transaction after resolving IGNITE-14317.
-checkEvents(k -> cache.removeAsync(k, "val").get(), true, 
EVT_CACHE_OBJECT_REMOVED);
+checkEvents(ignite, k -> cache.removeAsync(k, "val").get(), true, 
EVT_CACHE_OBJECT_REMOVED);
 
 checkEvents(ignite, k -> cache.removeAll(of(k)), true, 
EVT_CACHE_OBJECT_REMOVED);
 checkEvents(ignite, k -> cache.removeAllAsync(of(k)).get(), true, 
EVT_CACHE_OBJECT_REMOVED);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index f35f32ee2dd..876bc264f96 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -2811,7 +2811,7 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache

(ignite) branch master updated: IGNITE-21351 Fix NPE on metric "TransactionsHoldingLockNumber" if tx is not initialized (#11197)

2024-02-01 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new dbf53205ee7 IGNITE-21351 Fix NPE on metric 
"TransactionsHoldingLockNumber" if tx is not initialized (#11197)
dbf53205ee7 is described below

commit dbf53205ee73b879d707858188f43bbe2316
Author: Aleksey Plekhanov 
AuthorDate: Fri Feb 2 10:13:17 2024 +0300

IGNITE-21351 Fix NPE on metric "TransactionsHoldingLockNumber" if tx is not 
initialized (#11197)
---
 .../internal/processors/cache/transactions/IgniteTxStateImpl.java   | 2 +-
 .../test/java/org/apache/ignite/internal/TransactionMetricsTest.java| 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
index e5dbfebe84a..c049bd0f57d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
@@ -445,7 +445,7 @@ public class IgniteTxStateImpl extends 
IgniteTxLocalStateAdapter {
 
 /** {@inheritDoc} */
 @Override public boolean empty() {
-return txMap.isEmpty();
+return F.isEmpty(txMap);
 }
 
 /** {@inheritDoc} */
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsTest.java
index c655929f7bb..1eb675ad9e2 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsTest.java
@@ -107,6 +107,8 @@ public class TransactionMetricsTest extends 
GridCommonAbstractTest {
 //when: transaction is opening
 final Transaction tx1 = ignite.transactions().txStart(PESSIMISTIC, 
REPEATABLE_READ);
 
+assertEquals(0, txMXBean.getTransactionsHoldingLockNumber());
+
 int localKeysNum = 0;
 
 for (int i = 0; i < keysNumber; i++) {



(ignite) branch master updated (62ee94f0480 -> 483043fec8e)

2024-02-01 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


from 62ee94f0480 IGNITE-21342 Overridden outdated guava and grpc dependency 
versions in the OpenCensus module. (#11193)
 add 483043fec8e IGNITE-21366 SQL: Fix AssertionError due to cache size 
overflow (#11214)

No new revisions were added by this update.

Summary of changes:
 .../org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



(ignite) branch master updated: IGNITE-21349 SQL Calcite: Fix failure on sensitive information hiding for DDL statements - Fixes #11196.

2024-01-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 17c5d6bcc21 IGNITE-21349 SQL Calcite: Fix failure on sensitive 
information hiding for DDL statements - Fixes #11196.
17c5d6bcc21 is described below

commit 17c5d6bcc21a2a5be8fe2be7dee04871cee14683
Author: Aleksey Plekhanov 
AuthorDate: Fri Jan 26 10:15:26 2024 +0300

IGNITE-21349 SQL Calcite: Fix failure on sensitive information hiding for 
DDL statements - Fixes #11196.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   | 56 ++
 .../integration/SqlDiagnosticIntegrationTest.java  |  2 +-
 2 files changed, 37 insertions(+), 21 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 49720a4a242..196d1283b98 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -35,6 +35,7 @@ import org.apache.calcite.plan.RelTraitDef;
 import org.apache.calcite.rel.RelCollationTraitDef;
 import org.apache.calcite.schema.SchemaPlus;
 import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlDdl;
 import org.apache.calcite.sql.SqlDynamicParam;
 import org.apache.calcite.sql.SqlKind;
 import org.apache.calcite.sql.SqlLiteral;
@@ -99,6 +100,7 @@ import 
org.apache.ignite.internal.processors.query.calcite.schema.SchemaHolder;
 import 
org.apache.ignite.internal.processors.query.calcite.schema.SchemaHolderImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlAlterUser;
 import 
org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlConformance;
+import 
org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlCreateTable;
 import 
org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlCreateUser;
 import org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlOption;
 import 
org.apache.ignite.internal.processors.query.calcite.sql.fun.IgniteOwnSqlOperatorTable;
@@ -530,29 +532,43 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 if (QueryUtils.INCLUDE_SENSITIVE)
 return qry.toString();
 else {
-return qry.accept(
-new SqlShuttle() {
-@Override public SqlNode visit(SqlLiteral literal) {
-return new SqlDynamicParam(-1, 
literal.getParserPosition());
-}
-
-@Override public SqlNode visit(SqlCall call) {
-// Handle some special cases.
-if (call instanceof IgniteSqlOption)
-return call;
-else if (call instanceof IgniteSqlCreateUser) {
-return new 
IgniteSqlCreateUser(call.getParserPosition(), 
((IgniteSqlCreateUser)call).user(),
-SqlLiteral.createCharString("hidden", 
SqlParserPos.ZERO));
-}
-else if (call instanceof IgniteSqlAlterUser) {
-return new 
IgniteSqlAlterUser(call.getParserPosition(), ((IgniteSqlAlterUser)call).user(),
-SqlLiteral.createCharString("hidden", 
SqlParserPos.ZERO));
+try {
+return qry.accept(
+new SqlShuttle() {
+@Override public SqlNode visit(SqlLiteral literal) {
+return new SqlDynamicParam(-1, 
literal.getParserPosition());
 }
 
-return super.visit(call);
+@Override public SqlNode visit(SqlCall call) {
+// Handle some special cases.
+if (call instanceof IgniteSqlOption)
+return call;
+else if (call instanceof IgniteSqlCreateUser) {
+return new 
IgniteSqlCreateUser(call.getParserPosition(), 
((IgniteSqlCreateUser)call).user(),
+SqlLiteral.createCharString("hidden", 
SqlParserPos.ZERO));
+}
+else if (call instanceof IgniteSqlAlterUser) {
+return new 
IgniteSqlAlterUser(call.getParserPosition(), ((IgniteSqlAlterUser)call).user(),
+SqlLiteral.createCharStrin

(ignite) branch master updated: IGNITE-21315 Fix node join failure when create index in progress and caches have the same deploymentId - Fixes #11189.

2024-01-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 64692f98148 IGNITE-21315 Fix node join failure when create index in 
progress and caches have the same deploymentId - Fixes #11189.
64692f98148 is described below

commit 64692f9814836e14414a16916e6bac196a7a71db
Author: Aleksey Plekhanov 
AuthorDate: Thu Jan 25 16:19:33 2024 +0300

IGNITE-21315 Fix node join failure when create index in progress and caches 
have the same deploymentId - Fixes #11189.

Signed-off-by: Aleksey Plekhanov 
---
 .../processors/query/GridQueryProcessor.java   |   3 +-
 .../junits/common/GridCommonAbstractTest.java  |   6 +-
 .../DynamicIndexCreateAfterClusterRestartTest.java | 147 +
 .../IgniteBinaryCacheQueryTestSuite2.java  |   2 +
 4 files changed, 154 insertions(+), 4 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index d5750db595f..ef64022de22 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -1103,7 +1103,8 @@ public class GridQueryProcessor extends 
GridProcessorAdapter {
 // Apply pending operation which could have been completed as 
no-op at this point.
 // There could be only one in-flight operation for a cache.
 for (SchemaOperation op : schemaOps.values()) {
-if (F.eq(op.proposeMessage().deploymentId(), 
cacheInfo.dynamicDeploymentId())) {
+if (F.eq(op.proposeMessage().operation().cacheName(), 
cacheName)
+&& F.eq(op.proposeMessage().deploymentId(), 
cacheInfo.dynamicDeploymentId())) {
 if (op.started()) {
 SchemaOperationWorker worker = 
op.manager().worker();
 
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 859716e779b..49a8783f8d6 100755
--- 
a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -1977,10 +1977,10 @@ public abstract class GridCommonAbstractTest extends 
GridAbstractTest {
 }
 
 /**
- * @param name Instance name.
+ * @param consistentId Node consistentId.
  */
-protected void cleanPersistenceDir(String name) throws Exception {
-String dn2DirName = name.replace(".", "_");
+protected void cleanPersistenceDir(String consistentId) throws Exception {
+String dn2DirName = consistentId.replace(".", "_");
 
 U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), 
DFLT_STORE_DIR + "/" + dn2DirName, true));
 U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), 
DFLT_STORE_DIR + "/wal/" + dn2DirName, true));
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexCreateAfterClusterRestartTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexCreateAfterClusterRestartTest.java
new file mode 100644
index 000..fbf93543fc5
--- /dev/null
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexCreateAfterClusterRestartTest.java
@@ -0,0 +1,147 @@
+/*
+ * 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.processors.cache.index;
+
+import java.util.concurrent.CountDownLatch;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.cache.query.

(ignite) branch master updated: IGNITE-21171 SQL Calcite: Fix column nullability for data types with precession or scale - Fixes #11154.

2024-01-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new e2662a267ca IGNITE-21171 SQL Calcite: Fix column nullability for data 
types with precession or scale - Fixes #11154.
e2662a267ca is described below

commit e2662a267ca8751f193c4107140875ca42d7115d
Author: Aleksey Plekhanov 
AuthorDate: Thu Jan 25 13:47:49 2024 +0300

IGNITE-21171 SQL Calcite: Fix column nullability for data types with 
precession or scale - Fixes #11154.

Signed-off-by: Aleksey Plekhanov 
---
 .../calcite/schema/CacheTableDescriptorImpl.java   |  7 +++--
 .../schema/SystemViewTableDescriptorImpl.java  |  2 +-
 .../processors/query/calcite/util/TypeUtils.java   | 16 ---
 .../integration/QueryMetadataIntegrationTest.java  |  5 ++--
 .../integration/TableDdlIntegrationTest.java   | 33 --
 5 files changed, 52 insertions(+), 11 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheTableDescriptorImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheTableDescriptorImpl.java
index 84f05bd14d2..ab704a6850d 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheTableDescriptorImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheTableDescriptorImpl.java
@@ -701,7 +701,8 @@ public class CacheTableDescriptorImpl extends 
NullInitializerExpressionFactory
 f,
 storageType,
 desc != null && desc.precision() != -1 ? desc.precision() 
: PRECISION_NOT_SPECIFIED,
-desc != null && desc.scale() != -1 ? desc.scale() : 
SCALE_NOT_SPECIFIED
+desc != null && desc.scale() != -1 ? desc.scale() : 
SCALE_NOT_SPECIFIED,
+desc == null || !desc.notNull()
 );
 }
 
@@ -785,7 +786,9 @@ public class CacheTableDescriptorImpl extends 
NullInitializerExpressionFactory
 if (logicalType == null) {
 logicalType = TypeUtils.sqlType(f, storageType,
 desc.precision() == -1 ? PRECISION_NOT_SPECIFIED : 
desc.precision(),
-desc.scale() == -1 ? SCALE_NOT_SPECIFIED : desc.scale());
+desc.scale() == -1 ? SCALE_NOT_SPECIFIED : desc.scale(),
+!desc.notNull()
+);
 }
 
 return logicalType;
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SystemViewTableDescriptorImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SystemViewTableDescriptorImpl.java
index 9fdf58d68af..80d7f95b337 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SystemViewTableDescriptorImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SystemViewTableDescriptorImpl.java
@@ -261,7 +261,7 @@ public class SystemViewTableDescriptorImpl extends 
NullInitializerExpre
 /** {@inheritDoc} */
 @Override public RelDataType logicalType(IgniteTypeFactory f) {
 if (logicalType == null)
-logicalType = TypeUtils.sqlType(f, type, 
PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED);
+logicalType = TypeUtils.sqlType(f, type, 
PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED, true);
 
 return logicalType;
 }
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/TypeUtils.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/TypeUtils.java
index 1a4e862f55d..af7035281a2 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/TypeUtils.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/TypeUtils.java
@@ -180,14 +180,22 @@ public class TypeUtils {
 }
 
 /** */
-public static RelDataType sqlType(IgniteTypeFactory typeFactory, Class 
cls, int precision, int scale) {
+public static RelDataType sqlType(
+IgniteTypeFactory typeFactory,
+Class cls,
+int precision,
+int scale,
+boolean nullability
+) {
 RelDataType javaType = typeFactory.createJavaType(cls);
 
 if (javaType.getSqlTypeName().allowsPrecScale(true, true) &&
-(precision != RelDataType.PRECISION_NOT_SPECIFIED || scale != 
RelDataType.SCALE_NOT_SPECIFIED))
-return typeFactory.createSqlType(javaType.getSqlTypeName(), 
precision,

(ignite) branch master updated: IGNITE-20323 Fix checkstyle

2023-12-30 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 79b2c4127ff IGNITE-20323 Fix checkstyle
79b2c4127ff is described below

commit 79b2c4127ff5a0f4e5cfb111b53ab396263a1f12
Author: Aleksey Plekhanov 
AuthorDate: Sat Dec 30 20:26:32 2023 +0300

IGNITE-20323 Fix checkstyle
---
 .../query/calcite/rule/AbstractIgniteJoinConverterRule.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/AbstractIgniteJoinConverterRule.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/AbstractIgniteJoinConverterRule.java
index 5b44da340b5..5a135b3a51e 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/AbstractIgniteJoinConverterRule.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/AbstractIgniteJoinConverterRule.java
@@ -104,7 +104,7 @@ abstract class AbstractIgniteJoinConverterRule extends 
AbstractIgniteConverterRu
 
 HintDefinition curHintDef = HintDefinition.valueOf(hint.hintName);
 boolean curHintIsDisable = !HINTS.containsKey(curHintDef);
-boolean unableToProcess = false;
+boolean unableToProc = false;
 
 for (String tbl : joinTbls) {
 Collection prevTblHints = 
hintedTables.get(tbl);
@@ -128,11 +128,11 @@ abstract class AbstractIgniteJoinConverterRule extends 
AbstractIgniteConverterRu
 // forcing of different join types.
 if (curHintIsDisable && (disabled != null && 
disabled.size() == HINTS.size() - 1)
 || isMutuallyExclusive(curHintDef, prevTblHint))
-unableToProcess = true;
+unableToProc = true;
 }
 }
 
-if (unableToProcess) {
+if (unableToProc) {
 HintUtils.skippedHint(join, hint, "This join type is already 
disabled or forced to use before " +
 "by previous hints");
 



(ignite) branch master updated: IGNITE-20323 SQL Calcite: Add SQL hint for join type - Fixes #10918.

2023-12-29 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new c94a2d5584e IGNITE-20323 SQL Calcite: Add SQL hint for join type - 
Fixes #10918.
c94a2d5584e is described below

commit c94a2d5584eeb1bac0f6b6e7a27f31cca3e0e0c2
Author: Vladimir Steshin 
AuthorDate: Fri Dec 29 18:38:05 2023 +0300

IGNITE-20323 SQL Calcite: Add SQL hint for join type - Fixes #10918.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/SQL/sql-calcite.adoc|  37 +-
 .../query/calcite/hint/HintDefinition.java |  78 +++
 .../rel/logical/IgniteLogicalTableScan.java|   4 +-
 .../rule/AbstractIgniteJoinConverterRule.java  | 187 
 .../calcite/rule/CorrelatedNestedLoopJoinRule.java |  14 +-
 .../query/calcite/rule/MergeJoinConverterRule.java |   7 +-
 .../calcite/rule/NestedLoopJoinConverterRule.java  |   5 +-
 .../CalciteBasicSecondaryIndexIntegrationTest.java |   5 +-
 .../CalciteErrorHandlilngIntegrationTest.java  |   2 +-
 .../query/calcite/integration/DataTypesTest.java   |   3 +-
 .../integration/HashSpoolIntegrationTest.java  |   9 +-
 .../integration/IndexRebuildIntegrationTest.java   |   8 +-
 .../integration/IndexScanlIntegrationTest.java |  10 +-
 .../integration/IndexSpoolIntegrationTest.java |   4 +-
 .../integration/MemoryQuotasIntegrationTest.java   |   6 +-
 .../query/calcite/jdbc/JdbcQueryTest.java  |   2 +-
 .../calcite/planner/hints/HintsTestSuite.java  |   1 +
 .../planner/hints/JoinOrderHintsPlannerTest.java   |  28 +-
 .../planner/hints/JoinTypeHintPlannerTest.java | 525 +
 .../query/calcite/rules/JoinCommuteRulesTest.java  |  11 +-
 .../calcite/src/test/sql/sqlite/join/join1.test|   6 +-
 .../src/test/sql/sqlite/join/join1.test_ignore |   6 +-
 22 files changed, 882 insertions(+), 76 deletions(-)

diff --git a/docs/_docs/SQL/sql-calcite.adoc b/docs/_docs/SQL/sql-calcite.adoc
index 63e65244a2f..90a9a910aa4 100644
--- a/docs/_docs/SQL/sql-calcite.adoc
+++ b/docs/_docs/SQL/sql-calcite.adoc
@@ -276,9 +276,9 @@ SELECT /*+ FORCE_INDEX('TBL2_idx1') */ T1.V1, T2.V1 FROM 
TBL1 T1, TBL2 T2 WHERE
 
 
 === Hint scope
-Hints are defined for a relation operator, usually for SELECT. Most of the 
hints are "visible" to their relation
-operators, for the following operators, queries and subqueries. The hints 
defined in the subquery are "visible" only for
-this subquery and its subqueries. Hint is not "visible" to the previous 
relation operator if it is defined after it.
+Hints are defined for SELECT relation operator and are "visible" for the 
following operators, queries and subqueries.
+The hints defined in the subquery are "visible" only for this subquery and its 
subqueries. Hint is not "visible" to
+the previous relation operator if it is defined after it.
 
 Example:
 [source, SQL]
@@ -309,6 +309,18 @@ The optimizer tries to apply every hint and its 
parameters, if possible. But it
 * The hint parameter is incorrect or refers to a nonexistent object, such as a 
nonexistent index or table.
 * The current hints or current parameters are incompatible with the previous 
ones, such as forcing the use and disabling of the same index.
 
+=== Hint limitations
+Currently, SQL hints do not recognize the aliases. You can't refer to an alias 
like this:
+[source, SQL]
+
+SELECT /*+ MERGE_JOIN(T2) */ T2.V1 FROM TBL1 T1 JOIN TBL2 T2 ON T1.V3=T2.V1 
WHERE T1.V2=? AND T2.V2=?
+
+Instead, a table name have to be used:
+[source, SQL]
+
+SELECT /*+ MERGE_JOIN(TBL2) */ T2.V1 FROM TBL1 T1 JOIN TBL2 T2 ON T1.V3=T2.V1 
WHERE T1.V2=? AND T2.V2=?
+
+
 === Supportted hints
 
  FORCE_INDEX / NO_INDEX
@@ -342,6 +354,25 @@ SELECT /*+ ENFORCE_JOIN_ORDER */ T1.V1, T2.V1, T2.V2, 
T3.V1, T3.V2, T3.V3 FROM T
 SELECT t1.v1, t3.v2 FROM TBL1 t1 JOIN TBL3 t3 on t1.v3=t3.v3 WHERE t1.v2 in 
(SELECT /*+ ENFORCE_JOIN_ORDER */ t2.v2 FROM TBL2 t2 JOIN TBL3 t3 ON 
t2.v1=t3.v1)
 
 
+ MERGE_JOIN, NL_JOIN, CNL_JOIN
+Forces certain join type: Merge, Nested Loop and Correlated Nested Loop 
respectively.
+
+Every of those has the negation like 'NO_INDEX': CNL_JOIN, NO_CNL_JOIN. The 
negation hint disables certain join type.
+
+= Parameters:
+* Empty. To force or disable certain join type for every join.
+* Single or several tables names force or disable certain join type only for 
joining of these tables.
+
+= Example:
+[source, SQL]
+
+SELECT /*+ MERGE_JOIN */ t1.v1, t2.v2 FROM TBL1 t1, TBL2 t2 WHERE t1.v3=t2.v3
+
+SELECT /*+ NL_JOIN(TBL3,TBL1) */ t4.v1, t2.v2 FROM TBL1 t4 JOIN TBL2 t2 on 
t1.v3=t2.v3 WHERE t2.v1 in (SELECT t3.v3 FROM TBL3 t3 JOIN TBL1 t4 on 
t3.v2=t4.v2)
+
+SELECT t1.v1, t2.v2 FROM TBL2 t1 JOIN TBL1 t2 on t1.v3=t2.v3 WHERE t2.v3 in 
(SELECT /*+ NO_C

(ignite) branch master updated: IGNITE-21161 Fix node failure on timeout objects intersection - Fixes #11149.

2023-12-28 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 35358912d24 IGNITE-21161 Fix node failure on timeout objects 
intersection - Fixes #11149.
35358912d24 is described below

commit 35358912d241b6824b551c5158ab389531e81b6e
Author: Aleksey Plekhanov 
AuthorDate: Thu Dec 28 12:23:07 2023 +0300

IGNITE-21161 Fix node failure on timeout objects intersection - Fixes 
#11149.

Signed-off-by: Aleksey Plekhanov 
---
 .../processors/timeout/GridTimeoutProcessor.java   |   8 +-
 .../timeout/TimeoutObjectsIntersectionTest.java| 167 +
 .../IgniteTimeoutProcessorSelfTestSuite.java   |   3 +-
 3 files changed, 176 insertions(+), 2 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessor.java
index f0b3d3b94ae..ac026a5 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessor.java
@@ -57,7 +57,13 @@ public class GridTimeoutProcessor extends 
GridProcessorAdapter {
 if (res != 0)
 return res;
 
-return o1.timeoutId().compareTo(o2.timeoutId());
+res = o1.timeoutId().compareTo(o2.timeoutId());
+
+if (res != 0)
+return res;
+
+// There can be an intersection between timeouts and ids for 
different subsystems.
+return 
o1.getClass().getName().compareTo(o2.getClass().getName());
 }
 });
 
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/TimeoutObjectsIntersectionTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/TimeoutObjectsIntersectionTest.java
new file mode 100644
index 000..5bd803566ae
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/TimeoutObjectsIntersectionTest.java
@@ -0,0 +1,167 @@
+/*
+ * 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.processors.timeout;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.cache.affinity.AffinityFunctionContext;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.failure.FailureHandler;
+import org.apache.ignite.failure.StopNodeFailureHandler;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.util.GridTestClockTimer;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteFuture;
+import org.apache.ignite.lang.IgniteRunnable;
+import org.apache.ignite.lang.IgniteUuid;
+import org.apache.ignite.resources.IgniteInstanceResource;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+
+import static 
org.apache.ignite.IgniteSystemProperties.IGNITE_ATOMIC_DEFERRED_ACK_BUFFER_SIZE;
+import static 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.DFLT_ATOMIC_DEFERRED_ACK_TIMEOUT;
+
+/**
+ * Test timeout objects intersection for different subsystems.
+ */
+public class TimeoutObjectsIntersectionTest extends GridCommonAbstractTest {
+/** */
+private static final int JOBS_CNT = 200;
+
+/** {@inheritDoc} */
+@Override protected boolean isMultiJvm() {
+return true;
+}
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String 
igniteInstanceName) throws Excepti

(ignite) branch master updated: IGNITE-21131 SQL Calcite: Add support of OR operator with dynamic parameters for index scans - Fixes #11126.

2023-12-28 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 1b28860e4c1 IGNITE-21131 SQL Calcite: Add support of OR operator with 
dynamic parameters for index scans - Fixes #11126.
1b28860e4c1 is described below

commit 1b28860e4c1cde57beb423816f75ad0d84b90fcb
Author: Aleksey Plekhanov 
AuthorDate: Thu Dec 28 12:16:11 2023 +0300

IGNITE-21131 SQL Calcite: Add support of OR operator with dynamic 
parameters for index scans - Fixes #11126.

Signed-off-by: Aleksey Plekhanov 
---
 .../calcite/exec/exp/ExpressionFactoryImpl.java| 229 +++--
 .../processors/query/calcite/util/RexUtils.java| 147 +++--
 .../CalciteBasicSecondaryIndexIntegrationTest.java |   3 +-
 .../IndexMultiRangeScanIntegrationTest.java| 360 +
 .../SearchSargOnIndexIntegrationTest.java  | 153 -
 .../planner/IndexSearchBoundsPlannerTest.java  |  32 +-
 .../ignite/testsuites/IntegrationTestSuite.java|   4 +-
 7 files changed, 720 insertions(+), 208 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/ExpressionFactoryImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/ExpressionFactoryImpl.java
index 82b3a1fd859..187d2739457 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/ExpressionFactoryImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/ExpressionFactoryImpl.java
@@ -33,6 +33,7 @@ import java.util.function.BiPredicate;
 import java.util.function.Function;
 import java.util.function.Predicate;
 import java.util.function.Supplier;
+import java.util.stream.Collectors;
 import com.google.common.collect.ImmutableList;
 import com.google.common.primitives.Primitives;
 import org.apache.calcite.DataContext;
@@ -86,6 +87,12 @@ public class ExpressionFactoryImpl implements 
ExpressionFactory {
 /** */
 private static final Map SCALAR_CACHE = new 
GridBoundedConcurrentLinkedHashMap<>(1024);
 
+/** Placeholder for lowest possible value in range bound. This placeholder 
is only reqired to compare ranges. */
+private static final Object LOWEST_VALUE = new Object();
+
+/** Placeholder for highest possible value in range bound. This 
placeholder is only reqired to compare ranges. */
+private static final Object HIGHEST_VALUE = new Object();
+
 /** */
 private final IgniteTypeFactory typeFactory;
 
@@ -149,6 +156,24 @@ public class ExpressionFactoryImpl implements 
ExpressionFactory {
 Object c1 = hnd.get(fieldIdx, o1);
 Object c2 = hnd.get(fieldIdx, o2);
 
+if (c1 == LOWEST_VALUE || c2 == LOWEST_VALUE) {
+if (c1 != LOWEST_VALUE)
+return 1;
+else if (c2 != LOWEST_VALUE)
+return -1;
+else
+return 0;
+}
+
+if (c1 == HIGHEST_VALUE || c2 == HIGHEST_VALUE) {
+if (c1 != HIGHEST_VALUE)
+return -1;
+else if (c2 != HIGHEST_VALUE)
+return 1;
+else
+return 0;
+}
+
 // If filter for some field is unspecified, assume 
equality for this field and all subsequent fields.
 if (c1 == unspecifiedVal || c2 == unspecifiedVal)
 return 0;
@@ -287,7 +312,9 @@ public class ExpressionFactoryImpl implements 
ExpressionFactory {
 ) {
 RowFactory rowFactory = ctx.rowHandler().factory(typeFactory, 
rowType);
 
-List> ranges = new ArrayList<>();
+List ranges = new ArrayList<>();
+
+Comparator rowComparator = comparator(collation);
 
 expandBounds(
 ranges,
@@ -296,13 +323,14 @@ public class ExpressionFactoryImpl implements 
ExpressionFactory {
 rowFactory,
 collation.getKeys(),
 0,
+rowComparator,
 Arrays.asList(new RexNode[searchBounds.size()]),
 Arrays.asList(new RexNode[searchBounds.size()]),
 true,
 true
 );
 
-return new RangeIterableImpl(ranges, comparator(collation));
+return new RangeIterableImpl(ranges);
 }
 
 /**
@@ -314,18 +342,20 @@ public class ExpressionFactoryImpl implements 
ExpressionFactory {
  * @param rowFactory Row factory.
  * @param collationKeys Collation keys.
  * @param collationKeyIdx Current collation key index (field to pro

(ignite-extensions) branch master updated: IGNITE-21082 Fix excessive memory usage by performance statistics QueryHandler - Fixes #249.

2023-12-14 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
 new 209169d1 IGNITE-21082 Fix excessive memory usage by performance 
statistics QueryHandler - Fixes #249.
209169d1 is described below

commit 209169d17d7b46566332d99b30c047b688250b91
Author: Aleksey Plekhanov 
AuthorDate: Thu Dec 14 11:05:07 2023 +0300

IGNITE-21082 Fix excessive memory usage by performance statistics 
QueryHandler - Fixes #249.

Signed-off-by: Aleksey Plekhanov 
---
 .../internal/performancestatistics/handlers/QueryHandler.java  | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
 
b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
index 5153b734..d702772d 100644
--- 
a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
+++ 
b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
@@ -142,7 +142,7 @@ public class QueryHandler implements 
IgnitePerformanceStatisticsHandler {
 Map actions = rowsById.computeIfAbsent(qryNodeId, node 
-> new HashMap<>())
 .computeIfAbsent(id, qryId -> new HashMap<>());
 
-long[] rowsArr = actions.computeIfAbsent(action, act -> new long[] 
{0});
+long[] rowsArr = actions.computeIfAbsent(action.intern(), act -> new 
long[] {0});
 
 rowsArr[0] += rows;
 }
@@ -159,7 +159,10 @@ public class QueryHandler implements 
IgnitePerformanceStatisticsHandler {
 Map> props = 
propsById.computeIfAbsent(qryNodeId, node -> new HashMap<>())
 .computeIfAbsent(id, qryId -> new HashMap<>());
 
-T3 prop = props.computeIfAbsent(name + '=' + 
val, nv -> new T3<>(name, val, new long[] {0}));
+String key = (name + '=' + val).intern();
+
+T3 prop = props.computeIfAbsent(key,
+nv -> new T3<>(name.intern(), val.intern(), new long[] {0}));
 
 prop.get3()[0]++;
 }



(ignite) branch master updated: IGNITE-21078 .NET: Fix platform cache update with negative cache ID - Fixes #11094.

2023-12-13 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 6260854deb4 IGNITE-21078 .NET: Fix platform cache update with negative 
cache ID - Fixes #11094.
6260854deb4 is described below

commit 6260854deb4640ac07c2bce945436e2bd6109a14
Author: Aleksey Plekhanov 
AuthorDate: Thu Dec 14 10:36:12 2023 +0300

IGNITE-21078 .NET: Fix platform cache update with negative cache ID - Fixes 
#11094.

Signed-off-by: Aleksey Plekhanov 
---
 .../processors/platform/PlatformContextImpl.java   |  2 +-
 .../Platform/PlatformCacheTopologyChangeTest.cs| 26 ++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
index 81b5af96376..6e8272803f9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
@@ -605,7 +605,7 @@ public class PlatformContextImpl implements 
PlatformContext, PartitionsExchangeA
 
 Boolean useTls = platformCacheUpdateUseThreadLocal.get();
 if (useTls != null && useTls) {
-long cacheIdAndPartition = ((long)part << 32) | cacheId;
+long cacheIdAndPartition = ((long)part << 32) | (0xL & 
cacheId);
 
 gateway().platformCacheUpdateFromThreadLocal(
 cacheIdAndPartition, ver.topologyVersion(), 
ver.minorTopologyVersion());
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Platform/PlatformCacheTopologyChangeTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Platform/PlatformCacheTopologyChangeTest.cs
index f91537fd4f2..aa5d94c2738 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Platform/PlatformCacheTopologyChangeTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Platform/PlatformCacheTopologyChangeTest.cs
@@ -464,6 +464,32 @@ namespace Apache.Ignite.Core.Tests.Cache.Platform
 Console.WriteLine(">>> Retrieved {0} entries in {1}.", count, 
elapsed);
 }
 
+/// 
+/// Tests platform cache with negative cache ID updated correctly on 
topology change.
+/// 
+[Test]
+public void TestPlatformCacheWithNegativeId()
+{
+InitNodes(1);
+
+var cacheName = "negative_cache_id";
+
+var cacheConfiguration = new CacheConfiguration(cacheName)
+{
+PlatformCacheConfiguration = new PlatformCacheConfiguration()
+};
+
+var cache = _ignite[0].GetOrCreateCache(cacheConfiguration);
+
+var key = 0;
+var val = new Foo(-1);
+cache[key] = val;
+
+InitNode(1);
+
+Assert.AreEqual(val, cache[key]);
+}
+
 /// 
 /// Inits a number of grids.
 /// 



(ignite) branch master updated: IGNITE-21031 SQL Calcite: Fix performance statistics failure on nested scans - Fixes #11081.

2023-12-07 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 98e5e375b36 IGNITE-21031 SQL Calcite: Fix performance statistics 
failure on nested scans - Fixes #11081.
98e5e375b36 is described below

commit 98e5e375b36c8976da96d8546652b1fc39e71a74
Author: Aleksey Plekhanov 
AuthorDate: Thu Dec 7 12:55:22 2023 +0300

IGNITE-21031 SQL Calcite: Fix performance statistics failure on nested 
scans - Fixes #11081.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/exec/rel/ScanStorageNode.java|  7 ++-
 .../query/calcite/exec/tracker/IoTracker.java  |  8 ++-
 .../query/calcite/exec/tracker/NoOpIoTracker.java  |  4 +-
 .../tracker/PerformanceStatisticsIoTracker.java| 15 -
 .../integration/SqlDiagnosticIntegrationTest.java  | 66 ++
 5 files changed, 91 insertions(+), 9 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/ScanStorageNode.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/ScanStorageNode.java
index 48c98dbd2b4..2608b8716f4 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/ScanStorageNode.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/ScanStorageNode.java
@@ -64,9 +64,9 @@ public class ScanStorageNode extends ScanNode {
 
 /** {@inheritDoc} */
 @Override protected int processNextBatch() throws Exception {
-try {
-context().ioTracker().startTracking();
+boolean trackingStarted = context().ioTracker().startTracking();
 
+try {
 int processed = super.processNextBatch();
 
 if (processedRowsCntr != null)
@@ -75,7 +75,8 @@ public class ScanStorageNode extends ScanNode {
 return processed;
 }
 finally {
-context().ioTracker().stopTracking();
+if (trackingStarted)
+context().ioTracker().stopTracking();
 }
 }
 
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/IoTracker.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/IoTracker.java
index a246cb175b2..9a3b1b9aa06 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/IoTracker.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/IoTracker.java
@@ -24,8 +24,12 @@ import org.jetbrains.annotations.Nullable;
  * I/O operations tracker interface.
  */
 public interface IoTracker {
-/** Start tracking of I/O operations performed by current thread. */
-public void startTracking();
+/**
+ * Start tracking of I/O operations performed by current thread.
+ *
+ * @return {@code True} if tracking is started and wasn't started before.
+ */
+public boolean startTracking();
 
 /** Stop tracking and save result. */
 public void stopTracking();
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/NoOpIoTracker.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/NoOpIoTracker.java
index 4cc26d1967b..72fda5f5a7b 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/NoOpIoTracker.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/NoOpIoTracker.java
@@ -28,8 +28,8 @@ public class NoOpIoTracker implements IoTracker {
 public static final IoTracker INSTANCE = new NoOpIoTracker();
 
 /** {@inheritDoc} */
-@Override public void startTracking() {
-// No-op.
+@Override public boolean startTracking() {
+return false;
 }
 
 /** {@inheritDoc} */
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/PerformanceStatisticsIoTracker.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/PerformanceStatisticsIoTracker.java
index 2978e19cf28..f5c130070a4 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/PerformanceStatisticsIoTracker.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/tracker/PerformanceStatisticsIoTracker.java
@@ -20,6 +20,7 @@ package 
org.apache.ignite.internal.processors.query.calcite.exec.tracker;
 import java.util.List;
 import java.util.UUID;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.atomic.AtomicBoolean

(ignite) branch master updated: IGNITE-20837 Thin client: Fix partition awareness with node filter - Fixes #11039.

2023-11-23 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new d783edc9a18 IGNITE-20837 Thin client: Fix partition awareness with 
node filter - Fixes #11039.
d783edc9a18 is described below

commit d783edc9a188c2a13d78eebc912abd82b95a10bf
Author: Vladimir Steshin 
AuthorDate: Fri Nov 24 10:24:05 2023 +0300

IGNITE-20837 Thin client: Fix partition awareness with node filter - Fixes 
#11039.

Signed-off-by: Aleksey Plekhanov 
---
 .../client/cache/ClientCachePartitionsRequest.java |  10 -
 .../internal/util/collection/BitSetIntSet.java |  19 ++
 .../internal/util/collection/ImmutableIntSet.java  |  16 ++
 .../ThinClientAbstractPartitionAwarenessTest.java  |  22 +-
 ...ClientPartitionAwarenessStableTopologyTest.java | 243 -
 ...ientPartitionAwarenessUnstableTopologyTest.java |  24 +-
 6 files changed, 314 insertions(+), 20 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCachePartitionsRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCachePartitionsRequest.java
index 35740da13c6..44c8dfe265b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCachePartitionsRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCachePartitionsRequest.java
@@ -41,7 +41,6 @@ import 
org.apache.ignite.internal.processors.platform.client.ClientRequest;
 import org.apache.ignite.internal.processors.platform.client.ClientResponse;
 import org.apache.ignite.internal.util.lang.gridfunc.NotContainsPredicate;
 import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.lang.IgnitePredicate;
 import org.jetbrains.annotations.Nullable;
 import static java.util.Optional.ofNullable;
 import static 
org.apache.ignite.internal.processors.query.QueryUtils.isCustomAffinityMapper;
@@ -187,15 +186,6 @@ public class ClientCachePartitionsRequest extends 
ClientRequest {
 if (ccfg.getCacheMode() != CacheMode.PARTITIONED)
 return false;
 
-IgnitePredicate filter = ccfg.getNodeFilter();
-boolean hasNodeFilter = filter != null && !(filter instanceof 
CacheConfiguration.IgniteAllNodesPredicate);
-
-// We cannot be sure that two caches are co-located if custom node 
filter is present.
-// Note that technically we may try to compare two filters. However, 
this adds unnecessary complexity
-// and potential deserialization issues.
-if (hasNodeFilter)
-return false;
-
 return withCustomMappings || isDefaultMapping(ccfg);
 }
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/collection/BitSetIntSet.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/collection/BitSetIntSet.java
index 12e8075789c..a63573bbdc7 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/collection/BitSetIntSet.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/collection/BitSetIntSet.java
@@ -20,6 +20,7 @@ import java.util.BitSet;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+import java.util.Objects;
 import org.apache.ignite.internal.util.GridSerializableCollection;
 import org.jetbrains.annotations.NotNull;
 
@@ -223,4 +224,22 @@ public class BitSetIntSet extends 
GridSerializableCollection implements
 
 size = 0;
 }
+
+/** {@inheritDoc} */
+@Override public int hashCode() {
+return Objects.hashCode(bitSet);
+}
+
+/** {@inheritDoc} */
+@Override public boolean equals(Object o) {
+if (this == o)
+return true;
+
+if (o == null || getClass() != o.getClass())
+return false;
+
+BitSetIntSet o0 = (BitSetIntSet)o;
+
+return size == o0.size && bitSet.equals(o0.bitSet);
+}
 }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/collection/ImmutableIntSet.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/collection/ImmutableIntSet.java
index 2ce971ab599..f952d489525 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/collection/ImmutableIntSet.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/collection/ImmutableIntSet.java
@@ -106,6 +106,22 @@ public class ImmutableIntSet implements IntSet {
 return delegate.toString();
 }
 
+/** {@inheritDoc} */
+@Override public boolean equals(Object o) {
+if (this == o)
+return true;
+
+if (o == null || getClass() != o.getClass())
+return false;
+
+return delegate.equals(((ImmutableIn

(ignite) branch ignite-2.16 updated: IGNITE-20950 SQL Calcite: Fix NPE on write query plan to performance statistics - Fixes #11067.

2023-11-23 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.16
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.16 by this push:
 new 137ca49e88d IGNITE-20950 SQL Calcite: Fix NPE on write query plan to 
performance statistics - Fixes #11067.
137ca49e88d is described below

commit 137ca49e88d8a7fb4c0a39e15e830ec0f0d01d8b
Author: Aleksey Plekhanov 
AuthorDate: Fri Nov 24 10:10:29 2023 +0300

IGNITE-20950 SQL Calcite: Fix NPE on write query plan to performance 
statistics - Fixes #11067.

Signed-off-by: Aleksey Plekhanov 
(cherry picked from commit 141cc3699d3ba04c99fd074f85efc067fa5e11f8)
---
 .../query/calcite/prepare/PlanExtractor.java   |  4 --
 .../integration/SqlDiagnosticIntegrationTest.java  | 60 ++
 .../FilePerformanceStatisticsWriter.java   |  3 ++
 3 files changed, 63 insertions(+), 4 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
index 4c1273222a6..e350895ac34 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
@@ -50,10 +50,6 @@ public class PlanExtractor {
 
 /** */
 public String extract(IgniteRel rel) {
-// Currently, plan required only for preformance statistics, skip it 
if performance statistics disabled.
-if (!perfStatProc.enabled())
-return null;
-
 if (QueryUtils.INCLUDE_SENSITIVE)
 return RelOptUtil.toString(rel, SqlExplainLevel.ALL_ATTRIBUTES);
 else {
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
index f005d69c479..2274741bbc9 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
@@ -32,6 +32,7 @@ import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicIntegerArray;
 import java.util.concurrent.atomic.AtomicLong;
@@ -147,6 +148,8 @@ public class SqlDiagnosticIntegrationTest extends 
AbstractBasicIntegrationTest {
 super.afterTest();
 
 stopAllGrids();
+
+cleanPerformanceStatisticsDir();
 }
 
 /** */
@@ -430,6 +433,63 @@ public class SqlDiagnosticIntegrationTest extends 
AbstractBasicIntegrationTest {
 assertEquals(5L, rowsScanned.get());
 }
 
+/** */
+@Test
+public void testPerformanceStatisticsEnableAfterQuery() throws Exception {
+cleanPerformanceStatisticsDir();
+
+String qry = "SELECT * FROM table(system_range(1, 1000))";
+
+sql(grid(0), qry);
+
+startCollectStatistics();
+
+AtomicInteger finishQryCnt = new AtomicInteger();
+
grid(0).context().query().runningQueryManager().registerQueryFinishedListener(q 
-> finishQryCnt.incrementAndGet());
+
+sql(grid(0), qry);
+
+assertTrue(GridTestUtils.waitForCondition(() -> finishQryCnt.get() == 
1, 1_000L));
+
+AtomicInteger qryCnt = new AtomicInteger();
+AtomicBoolean hasPlan = new AtomicBoolean();
+
+stopCollectStatisticsAndRead(new 
AbstractPerformanceStatisticsTest.TestHandler() {
+@Override public void query(
+UUID nodeId,
+GridCacheQueryType type,
+String text,
+long id,
+long qryStartTime,
+long duration,
+boolean success
+) {
+qryCnt.incrementAndGet();
+
+assertEquals(grid(0).localNode().id(), nodeId);
+assertEquals(SQL_FIELDS, type);
+assertTrue(success);
+}
+
+@Override public void queryProperty(
+UUID nodeId,
+GridCacheQueryType type,
+UUID qryNodeId,
+long id,
+String name,
+String val
+) {
+if ("Query plan".equals(name)) {
+assertFalse(F.isEmpty(val));
+  

(ignite) branch master updated: IGNITE-20950 SQL Calcite: Fix NPE on write query plan to performance statistics - Fixes #11067.

2023-11-23 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 141cc3699d3 IGNITE-20950 SQL Calcite: Fix NPE on write query plan to 
performance statistics - Fixes #11067.
141cc3699d3 is described below

commit 141cc3699d3ba04c99fd074f85efc067fa5e11f8
Author: Aleksey Plekhanov 
AuthorDate: Fri Nov 24 10:10:29 2023 +0300

IGNITE-20950 SQL Calcite: Fix NPE on write query plan to performance 
statistics - Fixes #11067.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/prepare/PlanExtractor.java   |  4 --
 .../integration/SqlDiagnosticIntegrationTest.java  | 60 ++
 .../FilePerformanceStatisticsWriter.java   |  3 ++
 3 files changed, 63 insertions(+), 4 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
index 4c1273222a6..e350895ac34 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
@@ -50,10 +50,6 @@ public class PlanExtractor {
 
 /** */
 public String extract(IgniteRel rel) {
-// Currently, plan required only for preformance statistics, skip it 
if performance statistics disabled.
-if (!perfStatProc.enabled())
-return null;
-
 if (QueryUtils.INCLUDE_SENSITIVE)
 return RelOptUtil.toString(rel, SqlExplainLevel.ALL_ATTRIBUTES);
 else {
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
index f005d69c479..2274741bbc9 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
@@ -32,6 +32,7 @@ import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicIntegerArray;
 import java.util.concurrent.atomic.AtomicLong;
@@ -147,6 +148,8 @@ public class SqlDiagnosticIntegrationTest extends 
AbstractBasicIntegrationTest {
 super.afterTest();
 
 stopAllGrids();
+
+cleanPerformanceStatisticsDir();
 }
 
 /** */
@@ -430,6 +433,63 @@ public class SqlDiagnosticIntegrationTest extends 
AbstractBasicIntegrationTest {
 assertEquals(5L, rowsScanned.get());
 }
 
+/** */
+@Test
+public void testPerformanceStatisticsEnableAfterQuery() throws Exception {
+cleanPerformanceStatisticsDir();
+
+String qry = "SELECT * FROM table(system_range(1, 1000))";
+
+sql(grid(0), qry);
+
+startCollectStatistics();
+
+AtomicInteger finishQryCnt = new AtomicInteger();
+
grid(0).context().query().runningQueryManager().registerQueryFinishedListener(q 
-> finishQryCnt.incrementAndGet());
+
+sql(grid(0), qry);
+
+assertTrue(GridTestUtils.waitForCondition(() -> finishQryCnt.get() == 
1, 1_000L));
+
+AtomicInteger qryCnt = new AtomicInteger();
+AtomicBoolean hasPlan = new AtomicBoolean();
+
+stopCollectStatisticsAndRead(new 
AbstractPerformanceStatisticsTest.TestHandler() {
+@Override public void query(
+UUID nodeId,
+GridCacheQueryType type,
+String text,
+long id,
+long qryStartTime,
+long duration,
+boolean success
+) {
+qryCnt.incrementAndGet();
+
+assertEquals(grid(0).localNode().id(), nodeId);
+assertEquals(SQL_FIELDS, type);
+assertTrue(success);
+}
+
+@Override public void queryProperty(
+UUID nodeId,
+GridCacheQueryType type,
+UUID qryNodeId,
+long id,
+String name,
+String val
+) {
+if ("Query plan".equals(name)) {
+assertFalse(F.isEmpty(val));
+hasPlan.set(true);
+}
+}
+});
+
+assertEquals(1, qryCnt.get());
+

[ignite] branch master updated: IGNITE-20255 SQL Calcite: Add ENFORCE_JOIN_ORDER hint - Fixes #10910.

2023-10-26 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 79b9a4758ad IGNITE-20255 SQL Calcite: Add ENFORCE_JOIN_ORDER hint - 
Fixes #10910.
79b9a4758ad is described below

commit 79b9a4758ad3cb8d85fb129a6968340b53c3e8f9
Author: Vladimir Steshin 
AuthorDate: Thu Oct 26 20:45:50 2023 +0300

IGNITE-20255 SQL Calcite: Add ENFORCE_JOIN_ORDER hint - Fixes #10910.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/SQL/sql-calcite.adoc|   6 +-
 .../query/calcite/CalciteQueryProcessor.java   |   3 +-
 .../processors/query/calcite/RootQuery.java|   6 +-
 .../query/calcite/hint/HintDefinition.java |  32 +++
 .../processors/query/calcite/hint/HintUtils.java   |  14 +-
 .../processors/query/calcite/hint/HintsConfig.java |  35 ++-
 .../query/calcite/prepare/BaseQueryContext.java|  27 +-
 .../processors/query/calcite/prepare/CacheKey.java |   2 +-
 .../query/calcite/prepare/PlannerHelper.java   |  35 ++-
 .../query/calcite/prepare/PlannerPhase.java|   2 +-
 .../query/calcite/jdbc/JdbcQueryTest.java  |  65 -
 .../calcite/planner/hints/HintsTestSuite.java  |   3 +-
 .../planner/hints/JoinOrderHintsPlannerTest.java   | 279 +
 13 files changed, 491 insertions(+), 18 deletions(-)

diff --git a/docs/_docs/SQL/sql-calcite.adoc b/docs/_docs/SQL/sql-calcite.adoc
index a35689bc0ea..63e65244a2f 100644
--- a/docs/_docs/SQL/sql-calcite.adoc
+++ b/docs/_docs/SQL/sql-calcite.adoc
@@ -331,15 +331,15 @@ SELECT /*+ NO_INDEX */ T1.* FROM TBL1 T1 WHERE T1.V1 = 
T2.V1 AND T1.V2 > ?;
 SELECT /*+ NO_INDEX(TBL1_IDX2, TBL2_IDX1) */ T1.V1, T2.V1 FROM TBL1 T1, TBL2 
T2 WHERE T1.V1 = T2.V1 AND T1.V2 > ? AND T2.V2 > ?;
 
 
- ORDERED_JOINS
+ ENFORCE_JOIN_ORDER
 Forces join order as appears in a query. Fastens building of joins plan.
 
 = Example:
 [source, SQL]
 
-SELECT /*+ ORDERED_JOINS */ T1.V1, T2.V1, T2.V2, T3.V1, T3.V2, T3.V3 FROM TBL1 
T1 JOIN TBL2 T2 ON T1.V3=T2.V1 JOIN TBL3 T3 ON T2.V3=T3.V1 AND T2.V2=T3.V2
+SELECT /*+ ENFORCE_JOIN_ORDER */ T1.V1, T2.V1, T2.V2, T3.V1, T3.V2, T3.V3 FROM 
TBL1 T1 JOIN TBL2 T2 ON T1.V3=T2.V1 JOIN TBL3 T3 ON T2.V3=T3.V1 AND T2.V2=T3.V2
 
-SELECT t1.v1, t3.v2 FROM TBL1 t1 JOIN TBL3 t3 on t1.v3=t3.v3 WHERE t1.v2 in 
(SELECT /*+ ORDERED_JOINS */ t2.v2 FROM TBL2 t2 JOIN TBL3 t3 ON t2.v1=t3.v1)
+SELECT t1.v1, t3.v2 FROM TBL1 t1 JOIN TBL3 t3 on t1.v3=t3.v3 WHERE t1.v2 in 
(SELECT /*+ ENFORCE_JOIN_ORDER */ t2.v2 FROM TBL2 t2 JOIN TBL3 t3 ON 
t2.v1=t3.v1)
 
 
  EXPAND_DISTINCT_AGG
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 5e60cd44b17..49720a4a242 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -563,7 +563,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 
 SqlFieldsQuery sqlFieldsQry = qryCtx.unwrap(SqlFieldsQuery.class);
 
-return sqlFieldsQry != null ? sqlFieldsQry.isLocal() : null;
+return sqlFieldsQry != null ? F.asList(sqlFieldsQry.isLocal(), 
sqlFieldsQry.isEnforceJoinOrder()) : null;
 }
 
 /** */
@@ -588,6 +588,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 params,
 qryCtx,
 fldsQry != null && fldsQry.isLocal(),
+fldsQry != null && fldsQry.isEnforceJoinOrder(),
 fldsQry != null ? fldsQry.getPartitions() : null,
 exchangeSvc,
 (q, ex) -> qryReg.unregister(q.id(), ex),
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
index 8a1f1c20555..31fafc96eee 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
@@ -108,6 +108,7 @@ public class RootQuery extends Query implements 
TrackableQuery {
 Object[] params,
 QueryContext qryCtx,
 boolean isLocal,
+boolean forcedJoinOrder,
 int[] parts,
 ExchangeService exch,
 BiConsumer, Throwable> unregister,
@@ -146,6 +147,7 @@ public class RootQuery extends Query implements 
TrackableQuery {
 .build()
 )
 .local(isLocal)
+.

[ignite] branch master updated: IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes - Fixes #10996.

2023-10-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 655eb285da0 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes - Fixes #10996.
655eb285da0 is described below

commit 655eb285da0dc13fe1bff16eb85b5d62eaee0a78
Author: Aleksey Plekhanov 
AuthorDate: Fri Oct 20 16:48:08 2023 +0300

IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes - 
Fixes #10996.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   |  11 ++
 .../query/calcite/exec/ExchangeServiceImpl.java|  43 +++-
 .../query/calcite/exec/LogicalRelImplementor.java  |  15 ++-
 .../query/calcite/exec/MailboxRegistry.java|  14 +++
 .../query/calcite/exec/MailboxRegistryImpl.java|  12 ++-
 .../query/calcite/exec/TimeoutService.java |  28 +
 .../query/calcite/exec/TimeoutServiceImpl.java |  42 
 .../query/calcite/exec/rel/MergeJoinNode.java  | 118 +
 .../query/calcite/exec/rel/ModifyNode.java |   4 +-
 .../calcite/exec/rel/AbstractExecutionTest.java|   5 +
 .../query/calcite/exec/rel/ExecutionTest.java  |  95 +
 .../calcite/exec/rel/MergeJoinExecutionTest.java   |  18 +++-
 .../integration/AbstractBasicIntegrationTest.java  |  24 -
 .../integration/IndexScanlIntegrationTest.java |   2 +-
 .../integration/JoinRehashIntegrationTest.java |  75 +
 .../ignite/testsuites/IntegrationTestSuite.java|   6 +-
 16 files changed, 404 insertions(+), 108 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 3122d3c99d0..5e60cd44b17 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -74,6 +74,8 @@ import 
org.apache.ignite.internal.processors.query.calcite.exec.MailboxRegistry;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.MailboxRegistryImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutor;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl;
+import org.apache.ignite.internal.processors.query.calcite.exec.TimeoutService;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.TimeoutServiceImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.RexExecutorImpl;
 import org.apache.ignite.internal.processors.query.calcite.hint.HintsConfig;
 import 
org.apache.ignite.internal.processors.query.calcite.message.MessageService;
@@ -211,6 +213,9 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 /** */
 private final PrepareServiceImpl prepareSvc;
 
+/** */
+private final TimeoutService timeoutSvc;
+
 /** */
 private final QueryRegistry qryReg;
 
@@ -241,6 +246,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 mappingSvc = new MappingServiceImpl(ctx);
 exchangeSvc = new ExchangeServiceImpl(ctx);
 prepareSvc = new PrepareServiceImpl(ctx);
+timeoutSvc = new TimeoutServiceImpl(ctx);
 qryReg = new QueryRegistryImpl(ctx);
 
 QueryEngineConfiguration[] qryEnginesCfg = 
ctx.config().getSqlConfiguration().getQueryEnginesConfiguration();
@@ -325,6 +331,11 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 return prepareSvc;
 }
 
+/** */
+public TimeoutService timeoutService() {
+return timeoutSvc;
+}
+
 /** */
 public ExecutionService executionService() {
 return executionSvc;
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
index 4105896c403..b10b69f2213 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
@@ -21,7 +21,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Objects;
 import java.util.UUID;
-
 import com.google.common.collect.ImmutableMap;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
@@ -50,6 +49,9 @@ import org.apache.ignite.internal.util.typedef.F;
  *
  */
 public class

[ignite] branch ignite-20501 deleted (was da2cb6ffbc9)

2023-10-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a change to branch ignite-20501
in repository https://gitbox.apache.org/repos/asf/ignite.git


 was da2cb6ffbc9 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes

This change permanently discards the following revisions:

 discard da2cb6ffbc9 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes
 discard 7476486ea56 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes
 discard 5edf57e0809 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes



[ignite] branch ignite-20501 created (now da2cb6ffbc9)

2023-10-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a change to branch ignite-20501
in repository https://gitbox.apache.org/repos/asf/ignite.git


  at da2cb6ffbc9 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes

This branch includes the following new commits:

 new 5edf57e0809 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes
 new 7476486ea56 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes
 new da2cb6ffbc9 IGNITE-20501 SQL Calcite: Fix memory leak in 
MailboxRegistryImpl#remotes

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[ignite] 03/03: IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes

2023-10-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-20501
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit da2cb6ffbc95e67692cea4a3e80d58000708443b
Author: Aleksey Plekhanov 
AuthorDate: Fri Oct 20 15:16:26 2023 +0300

IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes
---
 .../processors/query/calcite/exec/rel/AbstractExecutionTest.java | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/AbstractExecutionTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/AbstractExecutionTest.java
index 8903956bf98..3bad2abfc7f 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/AbstractExecutionTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/AbstractExecutionTest.java
@@ -48,6 +48,7 @@ import 
org.apache.ignite.internal.processors.query.calcite.exec.MailboxRegistry;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.MailboxRegistryImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutor;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.TimeoutServiceImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.NoOpIoTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.NoOpMemoryTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.message.CalciteMessage;
@@ -55,6 +56,7 @@ import 
org.apache.ignite.internal.processors.query.calcite.message.MessageServic
 import 
org.apache.ignite.internal.processors.query.calcite.message.TestIoManager;
 import 
org.apache.ignite.internal.processors.query.calcite.metadata.FragmentDescription;
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.BaseQueryContext;
+import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.testframework.GridTestUtils;
@@ -159,6 +161,8 @@ public class AbstractExecutionTest extends 
GridCommonAbstractTest {
 for (UUID uuid : nodes) {
 GridTestKernalContext kernal = newContext();
 
+kernal.add(new GridTimeoutProcessor(kernal));
+
 QueryTaskExecutorImpl taskExecutor = new 
QueryTaskExecutorImpl(kernal);
 taskExecutor.stripedThreadPoolExecutor(new 
IgniteTestStripedThreadPoolExecutor(
 execStgy,
@@ -185,6 +189,7 @@ public class AbstractExecutionTest extends 
GridCommonAbstractTest {
 exchangeSvc.messageService(msgSvc);
 exchangeSvc.mailboxRegistry(mailboxRegistry);
 exchangeSvc.queryRegistry(new QueryRegistryImpl(kernal));
+exchangeSvc.timeoutService(new TimeoutServiceImpl(kernal));
 exchangeSvc.init();
 
 exchangeServices.put(uuid, exchangeSvc);



[ignite] 01/03: IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes

2023-10-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-20501
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 5edf57e08094f1b6182283b125e59a52e92e032b
Author: Aleksey Plekhanov 
AuthorDate: Wed Sep 27 19:57:20 2023 +0300

IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes
---
 .../query/calcite/CalciteQueryProcessor.java   |  11 +++
 .../query/calcite/exec/ExchangeServiceImpl.java|  43 -
 .../query/calcite/exec/LogicalRelImplementor.java  |  15 ++-
 .../query/calcite/exec/MailboxRegistry.java|  14 +++
 .../query/calcite/exec/MailboxRegistryImpl.java|  12 ++-
 .../query/calcite/exec/TimeoutService.java |  28 ++
 .../query/calcite/exec/TimeoutServiceImpl.java |  42 +
 .../query/calcite/exec/rel/MergeJoinNode.java  | 104 +++--
 .../query/calcite/exec/rel/ModifyNode.java |   4 +-
 .../query/calcite/exec/rel/ExecutionTest.java  |  95 ++-
 .../calcite/exec/rel/MergeJoinExecutionTest.java   |  18 +++-
 .../integration/AbstractBasicIntegrationTest.java  |  24 -
 .../integration/AggregatesIntegrationTest.java |   1 -
 .../integration/IndexScanlIntegrationTest.java |   2 +-
 .../integration/JoinRehashIntegrationTest.java |  75 +++
 .../ignite/testsuites/IntegrationTestSuite.java|   6 +-
 16 files changed, 399 insertions(+), 95 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 3122d3c99d0..5e60cd44b17 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -74,6 +74,8 @@ import 
org.apache.ignite.internal.processors.query.calcite.exec.MailboxRegistry;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.MailboxRegistryImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutor;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl;
+import org.apache.ignite.internal.processors.query.calcite.exec.TimeoutService;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.TimeoutServiceImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.RexExecutorImpl;
 import org.apache.ignite.internal.processors.query.calcite.hint.HintsConfig;
 import 
org.apache.ignite.internal.processors.query.calcite.message.MessageService;
@@ -211,6 +213,9 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 /** */
 private final PrepareServiceImpl prepareSvc;
 
+/** */
+private final TimeoutService timeoutSvc;
+
 /** */
 private final QueryRegistry qryReg;
 
@@ -241,6 +246,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 mappingSvc = new MappingServiceImpl(ctx);
 exchangeSvc = new ExchangeServiceImpl(ctx);
 prepareSvc = new PrepareServiceImpl(ctx);
+timeoutSvc = new TimeoutServiceImpl(ctx);
 qryReg = new QueryRegistryImpl(ctx);
 
 QueryEngineConfiguration[] qryEnginesCfg = 
ctx.config().getSqlConfiguration().getQueryEnginesConfiguration();
@@ -325,6 +331,11 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 return prepareSvc;
 }
 
+/** */
+public TimeoutService timeoutService() {
+return timeoutSvc;
+}
+
 /** */
 public ExecutionService executionService() {
 return executionSvc;
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
index 4105896c403..b10b69f2213 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
@@ -21,7 +21,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Objects;
 import java.util.UUID;
-
 import com.google.common.collect.ImmutableMap;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
@@ -50,6 +49,9 @@ import org.apache.ignite.internal.util.typedef.F;
  *
  */
 public class ExchangeServiceImpl extends AbstractService implements 
ExchangeService {
+/** */
+public static final long INBOX_INITIALIZATION_TIMEOUT = 1_000L;
+
 /** */
 private final UUID locaNodeId;
 
@@ -62,6 +64,9 @@ public class ExchangeServiceImpl extends

[ignite] 02/03: IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes

2023-10-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-20501
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 7476486ea567c13d71c5b37a62ecf03eac9b6ea7
Author: Aleksey Plekhanov 
AuthorDate: Fri Oct 20 10:06:14 2023 +0300

IGNITE-20501 SQL Calcite: Fix memory leak in MailboxRegistryImpl#remotes
---
 .../query/calcite/exec/rel/MergeJoinNode.java  | 54 --
 .../integration/AggregatesIntegrationTest.java |  1 +
 2 files changed, 21 insertions(+), 34 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MergeJoinNode.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MergeJoinNode.java
index 0a89fa68693..35f31e8b931 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MergeJoinNode.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MergeJoinNode.java
@@ -213,6 +213,14 @@ public abstract class MergeJoinNode extends 
AbstractNode {
 /** */
 protected abstract void join() throws Exception;
 
+/** */
+protected void checkJoinFinished() throws Exception {
+if (!distributed || (waitingLeft == NOT_WAITING && waitingRight == 
NOT_WAITING)) {
+requested = 0;
+downstream().end();
+}
+}
+
 /** */
 @NotNull public static  MergeJoinNode 
create(ExecutionContext ctx, RelDataType outputRowType, RelDataType 
leftRowType,
 RelDataType rightRowType, JoinRelType joinType, Comparator comp, 
boolean distributed) {
@@ -392,12 +400,8 @@ public abstract class MergeJoinNode extends 
AbstractNode {
 
 if (requested > 0 && ((waitingLeft == NOT_WAITING && left == null 
&& leftInBuf.isEmpty())
 || (waitingRight == NOT_WAITING && right == null && 
rightInBuf.isEmpty() && rightMaterialization == null))
-) {
-if (!distributed || (waitingLeft == NOT_WAITING && 
waitingRight == NOT_WAITING)) {
-requested = 0;
-downstream().end();
-}
-}
+)
+checkJoinFinished();
 }
 }
 
@@ -579,12 +583,8 @@ public abstract class MergeJoinNode extends 
AbstractNode {
 if (waitingLeft == 0)
 leftSource().request(waitingLeft = IN_BUFFER_SIZE);
 
-if (requested > 0 && waitingLeft == NOT_WAITING && left == null && 
leftInBuf.isEmpty()) {
-if (!distributed || (waitingLeft == NOT_WAITING && 
waitingRight == NOT_WAITING)) {
-requested = 0;
-downstream().end();
-}
-}
+if (requested > 0 && waitingLeft == NOT_WAITING && left == null && 
leftInBuf.isEmpty())
+checkJoinFinished();
 }
 }
 
@@ -775,12 +775,8 @@ public abstract class MergeJoinNode extends 
AbstractNode {
 if (waitingLeft == 0)
 leftSource().request(waitingLeft = IN_BUFFER_SIZE);
 
-if (requested > 0 && waitingRight == NOT_WAITING && right == null 
&& rightInBuf.isEmpty() && rightMaterialization == null) {
-if (!distributed || (waitingLeft == NOT_WAITING && 
waitingRight == NOT_WAITING)) {
-requested = 0;
-downstream().end();
-}
-}
+if (requested > 0 && waitingRight == NOT_WAITING && right == null 
&& rightInBuf.isEmpty() && rightMaterialization == null)
+checkJoinFinished();
 }
 }
 
@@ -1012,10 +1008,8 @@ public abstract class MergeJoinNode extends 
AbstractNode {
 
 if (requested > 0 && waitingLeft == NOT_WAITING && left == null && 
leftInBuf.isEmpty()
 && waitingRight == NOT_WAITING && right == null && 
rightInBuf.isEmpty() && rightMaterialization == null
-) {
-requested = 0;
-downstream().end();
-}
+)
+checkJoinFinished();
 }
 }
 
@@ -1089,12 +1083,8 @@ public abstract class MergeJoinNode extends 
AbstractNode {
 
 if (requested > 0 && ((waitingLeft == NOT_WAITING && left == null 
&& leftInBuf.isEmpty()
 || (waitingRight == NOT_WAITING && right == null && 
rightInBuf.isEmpty(
-) {
-if (!distributed || (waitingLeft == NOT_WAITING && 
waitingRight == NOT_WAITING)) {
-requested = 0;
-  

[ignite] branch master updated: IGNITE-20658 Update Ignite dependency: PostgreSQL - Fixes #10999.

2023-10-17 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 970429c203c IGNITE-20658 Update Ignite dependency: PostgreSQL - Fixes 
#10999.
970429c203c is described below

commit 970429c203c7dc08c4f2b03ccaa37061b5ff81b4
Author: Aleksandr Nikolaev 
AuthorDate: Tue Oct 17 18:30:47 2023 +0300

IGNITE-20658 Update Ignite dependency: PostgreSQL - Fixes #10999.

Signed-off-by: Aleksey Plekhanov 
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index fe2fba27d84..396759836d9 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -130,7 +130,7 @@
 1.1.2
 2.0.8_6
 1.0.2
-42.5.0
+42.6.0
 2.10.7
 2.10.7
 2.11.12



[ignite] branch master updated: IGNITE-20587 Documentation: SQL hints - Fixes #10983.

2023-10-13 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 3a2049a79c4 IGNITE-20587 Documentation: SQL hints - Fixes #10983.
3a2049a79c4 is described below

commit 3a2049a79c4ecfb01ee9485e4a3b1b0523ee1067
Author: Vladimir Steshin 
AuthorDate: Fri Oct 13 19:39:34 2023 +0300

IGNITE-20587 Documentation: SQL hints - Fixes #10983.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_data/toc.yaml|   2 +
 docs/_docs/SQL/sql-calcite.adoc| 160 +++--
 docs/_docs/sql-reference/hints.adoc|  17 +++
 .../query/calcite/hint/HintDefinition.java |   5 +-
 4 files changed, 170 insertions(+), 14 deletions(-)

diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml
index 4fd8289fcdd..700c9aa9b09 100644
--- a/docs/_data/toc.yaml
+++ b/docs/_data/toc.yaml
@@ -250,6 +250,8 @@
   url: sql-reference/system-functions
 - title: Data Types
   url: sql-reference/data-types
+- title: Optimizer Hints
+  url: sql-reference/hints
 - title: Distributed Computing
   items:
 - title: Distributed Computing API
diff --git a/docs/_docs/SQL/sql-calcite.adoc b/docs/_docs/SQL/sql-calcite.adoc
index 33456457de7..a35689bc0ea 100644
--- a/docs/_docs/SQL/sql-calcite.adoc
+++ b/docs/_docs/SQL/sql-calcite.adoc
@@ -123,19 +123,6 @@ QUERY_ENGINE=CALCITE
 
 --
 
-=== QUERY_ENGINE Hint
-
-To select a particular engine to run individual queries, use the 
`QUERY_ENGINE` hint:
-
-[tabs]
---
-tab:Query with QUERY_ENGINE hint[]
-[source,sql]
-
-SELECT /*+ QUERY_ENGINE('calcite') */ fld FROM table;
-
---
-
 == SQL Reference
 
 === DDL
@@ -241,3 +228,150 @@ Below are the data types supported by the Calcite-based 
SQL engine:
 |`java.lang.Object`
 
 |===
+
+== Optimizer hints [[hints]]
+
+The query optimizer does its best to build the fastest excution plan. However, 
this is a far way to create an optimizer
+which is the most effective for each case. You can better know about the data 
design, application design or data
+distribution in the cluster. SQL hints can help the optimizer to make 
optimizations more rationally or build
+execution plan faster.
+
+[NOTE]
+
+SQL hints are optional to apply and might be skipped in some cases.
+
+
+=== Hints format
+SQL hints are defined by a special comment +++/*+ HINT */+++ reffered as a 
_hint block_. Spaces before and after the
+hint name are required. The hint block is placed right after a relation 
operator, often after _SELECT_. Several hint
+blocks for one relation operator *are not allowed*.
+
+Example:
+[source, SQL]
+
+SELECT /*+ NO_INDEX */ T1.* FROM TBL1 where T1.V1=? and T1.V2=?
+
+
+It is allowed to define several hints for the same relation operator. To use 
several hints, separate them by comma
+(spaces are optional).
+
+Example:
+[source, SQL]
+
+SELECT /*+ NO_INDEX, EXPAND_DISTINCT_AGG */ SUM(DISTINCT V1), AVG(DISTINCT V2) 
FROM TBL1 GROUP BY V3 WHERE V3=?
+
+
+ Hint parameters
+Hint parameters, if required, are placed in brackets after the hint name and 
separated by commas.
+
+The hint parameter can be quoted. Quoted parameter is case-sensitive. The 
quoted and unquoted parameters cannot be
+defined for the same hint.
+
+Example:
+[source, SQL]
+
+SELECT /*+ FORCE_INDEX(TBL1_IDX2,TBL2_IDX1) */ T1.V1, T2.V1 FROM TBL1 T1, TBL2 
T2 WHERE T1.V1 = T2.V1 AND T1.V2 > ? AND T2.V2 > ?;
+
+SELECT /*+ FORCE_INDEX('TBL2_idx1') */ T1.V1, T2.V1 FROM TBL1 T1, TBL2 T2 
WHERE T1.V1 = T2.V1 AND T1.V2 > ? AND T2.V2 > ?;
+
+
+=== Hint scope
+Hints are defined for a relation operator, usually for SELECT. Most of the 
hints are "visible" to their relation
+operators, for the following operators, queries and subqueries. The hints 
defined in the subquery are "visible" only for
+this subquery and its subqueries. Hint is not "visible" to the previous 
relation operator if it is defined after it.
+
+Example:
+[source, SQL]
+
+SELECT /*+ NO_INDEX(TBL1_IDX2), FORCE_INDEX(TBL2_IDX2) */ T1.V1 FROM TBL1 T1 
WHERE T1.V2 IN (SELECT T2.V2 FROM TBL2 T2 WHERE T2.V1=? AND T2.V2=?);
+
+SELECT T1.V1 FROM TBL1 T1 WHERE T1.V2 IN (SELECT /*+ FORCE_INDEX(TBL2_IDX2) */ 
T2.V2 FROM TBL2 T2 WHERE T2.V1=? AND T2.V2=?);
+
+
+Note that only the first query has a hint in such a case as:
+[source, SQL]
+
+SELECT /*+ FORCE_INDEX */ V1 FROM TBL1 WHERE V1=? AND V2=?
+UNION ALL
+SELECT V1 FROM TBL1 WHERE V3>?
+
+
+But *there are exceptions*: hints of engine or optimizer level, such as 
link:#hint_disable_rule[_DISABLE_RULE_] or
+link:#hint_query_engine[_QUERY_ENGINE_]. Such hints should be defined at the 
beginning of the query and are related to
+the whole query.
+
+=== Hints errors
+The optimizer tries to apply every hint and its parameters

[ignite] branch master updated: IGNITE-20136 SQL Calcite: Add FORCE_INDEX/NO_INDEX hints - Fixes #10902.

2023-09-28 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 9f70c2a048b IGNITE-20136 SQL Calcite: Add FORCE_INDEX/NO_INDEX hints - 
Fixes #10902.
9f70c2a048b is described below

commit 9f70c2a048b305c29435c0778663fc59c57fb2fb
Author: Vladimir Steshin 
AuthorDate: Thu Sep 28 09:49:06 2023 +0300

IGNITE-20136 SQL Calcite: Add FORCE_INDEX/NO_INDEX hints - Fixes #10902.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   |  12 +-
 .../query/calcite/hint/HintDefinition.java |  86 ++
 .../query/calcite/hint/HintOptionsChecker.java |  30 +++
 .../processors/query/calcite/hint/HintUtils.java   | 175 +
 .../processors/query/calcite/hint/HintsConfig.java |  85 ++
 .../query/calcite/prepare/IgnitePlanner.java   |   6 +-
 .../query/calcite/prepare/PlannerHelper.java   |  40 ++-
 .../query/calcite/rel/AbstractIndexScan.java   |   5 +-
 .../query/calcite/rel/IgniteIndexScan.java |   3 +-
 .../rel/logical/IgniteLogicalIndexScan.java|   3 +-
 .../rel/logical/IgniteLogicalTableScan.java|  23 +-
 .../calcite/rule/HashAggregateConverterRule.java   |   2 +-
 .../calcite/rule/SortAggregateConverterRule.java   |   2 +-
 .../calcite/rule/logical/ExposeIndexRule.java  |  63 +
 .../calcite/rule/logical/FilterScanMergeRule.java  |   2 +-
 .../calcite/rule/logical/LogicalOrToUnionRule.java |   1 +
 .../calcite/rule/logical/ProjectScanMergeRule.java |   1 +
 .../query/calcite/schema/CacheTableImpl.java   |   3 +-
 .../query/calcite/schema/SystemViewIndexImpl.java  |   3 +-
 .../query/calcite/schema/SystemViewTableImpl.java  |   3 +-
 .../processors/query/calcite/util/HintUtils.java   |  60 -
 .../integration/IndexScanlIntegrationTest.java |  78 ++
 .../query/calcite/planner/AbstractPlannerTest.java |   6 +-
 .../query/calcite/planner/TestTable.java   |   3 +-
 .../planner/hints/CommonHintsPlannerTest.java  | 118 +
 .../planner/hints/ForceIndexHintPlannerTest.java   | 208 +++
 .../calcite/planner/hints/HintsTestSuite.java  |  33 +++
 .../planner/hints/NoIndexHintPlannerTest.java  | 288 +
 .../apache/ignite/testsuites/PlannerTestSuite.java |   3 +
 29 files changed, 1246 insertions(+), 99 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 7be8acb3ed5..3122d3c99d0 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -33,8 +33,6 @@ import org.apache.calcite.plan.Contexts;
 import org.apache.calcite.plan.ConventionTraitDef;
 import org.apache.calcite.plan.RelTraitDef;
 import org.apache.calcite.rel.RelCollationTraitDef;
-import org.apache.calcite.rel.core.Aggregate;
-import org.apache.calcite.rel.hint.HintStrategyTable;
 import org.apache.calcite.schema.SchemaPlus;
 import org.apache.calcite.sql.SqlCall;
 import org.apache.calcite.sql.SqlDynamicParam;
@@ -77,6 +75,7 @@ import 
org.apache.ignite.internal.processors.query.calcite.exec.MailboxRegistryI
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutor;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.RexExecutorImpl;
+import org.apache.ignite.internal.processors.query.calcite.hint.HintsConfig;
 import 
org.apache.ignite.internal.processors.query.calcite.message.MessageService;
 import 
org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.metadata.AffinityService;
@@ -143,14 +142,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 .withInSubQueryThreshold(Integer.MAX_VALUE)
 .withDecorrelationEnabled(true)
 .withExpand(false)
-.withHintStrategyTable(
-HintStrategyTable.builder()
-.hintStrategy("DISABLE_RULE", (hint, rel) -> true)
-.hintStrategy("EXPAND_DISTINCT_AGG", (hint, rel) -> rel 
instanceof Aggregate)
-// QUERY_ENGINE hint preprocessed by regexp, but to avoid 
warnings should be also in HintStrategyTable.
-.hintStrategy("QUERY_ENGINE", (hint, rel) -> true)
-.build()
-)
+.withHintStrategyTable(HintsConfig.buildHintTable(

[ignite] branch master updated: IGNITE-20462 Fix idle_verify hash conflicts for expiring entries - Fixes #10947.

2023-09-26 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 158bd2c0d65 IGNITE-20462 Fix idle_verify hash conflicts for expiring 
entries - Fixes #10947.
158bd2c0d65 is described below

commit 158bd2c0d6546d01e55e541dc1b9a3156713d183
Author: Aleksey Plekhanov 
AuthorDate: Tue Sep 26 14:16:39 2023 +0300

IGNITE-20462 Fix idle_verify hash conflicts for expiring entries - Fixes 
#10947.

Signed-off-by: Aleksey Plekhanov 
---
 .../apache/ignite/util/GridCommandHandlerTest.java | 36 ++
 .../SnapshotPartitionsQuickVerifyHandler.java  |  3 +-
 .../snapshot/SnapshotPartitionsVerifyHandler.java  | 43 +-
 .../processors/cache/verify/IdleVerifyUtility.java |  3 ++
 .../cache/verify/PartitionHashRecordV2.java| 16 
 .../snapshot/IgniteClusterSnapshotCheckTest.java   | 30 +++
 6 files changed, 129 insertions(+), 2 deletions(-)

diff --git 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index abb7a50c4fb..6a40bfb738e 100644
--- 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -34,6 +34,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Random;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
@@ -52,6 +53,9 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
+import javax.cache.expiry.CreatedExpiryPolicy;
+import javax.cache.expiry.Duration;
+import javax.cache.expiry.ExpiryPolicy;
 import javax.cache.processor.EntryProcessor;
 import javax.cache.processor.EntryProcessorException;
 import javax.cache.processor.MutableEntry;
@@ -2393,6 +2397,38 @@ public class GridCommandHandlerTest extends 
GridCommandHandlerClusterPerMethodAb
 assertContains(log, testOut.toString(), "MOVING partitions");
 }
 
+/**
+ * @throws Exception If failed.
+ */
+@Test
+public void testCacheIdleVerifyExpiringEntries() throws Exception {
+IgniteEx ignite = startGrids(3);
+
+ignite.cluster().state(ACTIVE);
+
+IgniteCache cache = ignite.createCache(new 
CacheConfiguration<>(DEFAULT_CACHE_NAME)
+.setAffinity(new RendezvousAffinityFunction(false, 32))
+.setBackups(1));
+
+Random rnd = new Random();
+
+// Put without expiry policy.
+for (int i = 0; i < 5_000; i++)
+cache.put(i, i);
+
+// Put with expiry policy.
+for (int i = 5_000; i < 10_000; i++) {
+ExpiryPolicy expPol = new CreatedExpiryPolicy(new 
Duration(TimeUnit.MILLISECONDS, rnd.nextInt(1_000)));
+cache.withExpiryPolicy(expPol).put(i, i);
+}
+
+injectTestSystemOut();
+
+assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify"));
+
+assertContains(log, testOut.toString(), "no conflicts have been 
found");
+}
+
 /** */
 @Test
 public void testCacheSequence() throws Exception {
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsQuickVerifyHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsQuickVerifyHandler.java
index 8bc5166e8d3..e378dec9b35 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsQuickVerifyHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsQuickVerifyHandler.java
@@ -89,7 +89,8 @@ public class SnapshotPartitionsQuickVerifyHandler extends 
SnapshotPartitionsVeri
 if (other == null)
 return;
 
-if (val.size() != other.size() || 
!Objects.equals(val.updateCounter(), other.updateCounter()))
+if ((!val.hasExpiringEntries() && !other.hasExpiringEntries() && 
val.size() != other.size())
+|| !Objects.equals(val.updateCounter(), other.updateCounter()))
 wrnGrps.add(part.groupId());
 }));
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsVerifyHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsVerifyHandler.java
index 3547d5edf30..e24a51c6b08 100644
--- 
a/mo

[ignite] branch master updated: IGNITE-20382 SQL Calcite: Add metrics for CalciteQueryExecutor thread pool - Fixes #10933.

2023-09-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new ad02c96e062 IGNITE-20382 SQL Calcite: Add metrics for 
CalciteQueryExecutor thread pool - Fixes #10933.
ad02c96e062 is described below

commit ad02c96e062e78b1292eb3cc6f4102b5076eabc1
Author: Aleksey Plekhanov 
AuthorDate: Mon Sep 25 17:48:47 2023 +0300

IGNITE-20382 SQL Calcite: Add metrics for CalciteQueryExecutor thread pool 
- Fixes #10933.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/exec/QueryTaskExecutorImpl.java  | 22 +-
 .../integration/SqlDiagnosticIntegrationTest.java  | 20 
 2 files changed, 33 insertions(+), 9 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/QueryTaskExecutorImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/QueryTaskExecutorImpl.java
index c572901afbc..c22714783d7 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/QueryTaskExecutorImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/QueryTaskExecutorImpl.java
@@ -17,20 +17,22 @@
 
 package org.apache.ignite.internal.processors.query.calcite.exec;
 
-import java.util.Objects;
 import java.util.UUID;
 import org.apache.ignite.internal.GridKernalContext;
-import 
org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor;
 import 
org.apache.ignite.internal.processors.query.calcite.util.AbstractService;
-import org.apache.ignite.internal.processors.query.calcite.util.Commons;
-import org.apache.ignite.internal.util.StripedExecutor;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.thread.IgniteStripedThreadPoolExecutor;
 
+import static 
org.apache.ignite.internal.processors.metric.impl.MetricUtils.metricName;
+import static 
org.apache.ignite.internal.processors.pool.PoolProcessor.THREAD_POOLS;
+
 /**
- * TODO use {@link StripedExecutor}, registered in core pols.
+ * Query task executor.
  */
 public class QueryTaskExecutorImpl extends AbstractService implements 
QueryTaskExecutor, Thread.UncaughtExceptionHandler {
+/** */
+public static final String THREAD_POOL_NAME = "CalciteQueryExecutor";
+
 /** */
 private IgniteStripedThreadPoolExecutor stripedThreadPoolExecutor;
 
@@ -82,16 +84,18 @@ public class QueryTaskExecutorImpl extends AbstractService 
implements QueryTaskE
 @Override public void onStart(GridKernalContext ctx) {
 exceptionHandler(ctx.uncaughtExceptionHandler());
 
-CalciteQueryProcessor proc = 
Objects.requireNonNull(Commons.lookupComponent(ctx, 
CalciteQueryProcessor.class));
-
-stripedThreadPoolExecutor(new IgniteStripedThreadPoolExecutor(
+IgniteStripedThreadPoolExecutor executor = new 
IgniteStripedThreadPoolExecutor(
 ctx.config().getQueryThreadPoolSize(),
 ctx.igniteInstanceName(),
 "calciteQry",
 this,
 false,
 0
-));
+);
+
+stripedThreadPoolExecutor(executor);
+
+
executor.registerMetrics(ctx.metric().registry(metricName(THREAD_POOLS, 
THREAD_POOL_NAME)));
 }
 
 /** {@inheritDoc} */
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
index 25c702bac5c..f005d69c479 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlDiagnosticIntegrationTest.java
@@ -53,10 +53,12 @@ import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.query.GridCacheQueryType;
 import org.apache.ignite.internal.processors.metric.MetricRegistry;
 import 
org.apache.ignite.internal.processors.performancestatistics.AbstractPerformanceStatisticsTest;
+import org.apache.ignite.internal.processors.pool.PoolProcessor;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
 import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.processors.query.calcite.Query;
 import org.apache.ignite.internal.processors.query.calcite.QueryRegistry;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl;
 import org.apache.ignite.internal.processors.security.SecurityContext;
 import org.apache.ignite.internal.uti

[ignite] branch master updated: IGNITE-19553 Add metrics for operations on secondary indexes - Fixes #10731.

2023-09-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 29c4b6e0f2d IGNITE-19553 Add metrics for operations on secondary 
indexes - Fixes #10731.
29c4b6e0f2d is described below

commit 29c4b6e0f2d60548334800cd718290d5f6636dbe
Author: Aleksey Plekhanov 
AuthorDate: Mon Sep 25 17:43:52 2023 +0300

IGNITE-19553 Add metrics for operations on secondary indexes - Fixes #10731.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/monitoring-metrics/new-metrics.adoc |  17 +-
 .../org/apache/ignite/IgniteSystemProperties.java  |   6 +
 .../query/index/sorted/inline/InlineIndexImpl.java |   5 +
 .../query/index/sorted/inline/InlineIndexTree.java |  76 ++-
 .../cache/persistence/tree/BPlusTree.java  |  46 +++--
 .../cache/index/BPlusTreeMetricsTest.java  | 228 +
 .../IgniteBinaryCacheQueryTestSuite.java   |   2 +
 7 files changed, 356 insertions(+), 24 deletions(-)

diff --git a/docs/_docs/monitoring-metrics/new-metrics.adoc 
b/docs/_docs/monitoring-metrics/new-metrics.adoc
index 1b260d435e0..5f3aaeabc00 100644
--- a/docs/_docs/monitoring-metrics/new-metrics.adoc
+++ b/docs/_docs/monitoring-metrics/new-metrics.adoc
@@ -241,7 +241,7 @@ Register name: `io.statistics.cacheGroups.{group_name}`
 |===
 
 
-== Sorted Indexes
+== Sorted Indexes I/O statistics
 
 Register name: `io.statistics.sortedIndexes.{cache_name}.{index_name}`
 
@@ -257,8 +257,21 @@ Register name: 
`io.statistics.sortedIndexes.{cache_name}.{index_name}`
 |startTime|   long|Statistics collection start time
 |===
 
+== Sorted Indexes operations
 
-== Hash Indexes
+Contains metrics about low-level operations (such as `Insert`, `Search`, etc.) 
on pages of sorted secondary indexes.
+
+Register name: `index.{schema_name}.{table_name}.{index_name}`
+
+[cols="2,1,3",opts="header"]
+|===
+|Name |Type |Description
+|{opType}Count|   long|   Count of {opType} operations on index.
+|{opType}Time|   long|   Total duration (nanoseconds) of {opType} operations 
on index.
+|===
+
+
+== Hash Indexes I/O statistics
 
 Register name: `io.statistics.hashIndexes.{cache_name}.{index_name}`
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java 
b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index b0682d54a36..32056ed6304 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -1436,6 +1436,12 @@ public final class IgniteSystemProperties {
 defaults = "" + IGNITE_BPLUS_TREE_LOCK_RETRIES_DEFAULT)
 public static final String IGNITE_BPLUS_TREE_LOCK_RETRIES = 
"IGNITE_BPLUS_TREE_LOCK_RETRIES";
 
+/**
+ * Disables secondary indexes B+Tree metrics.
+ */
+@SystemProperty(value = "Disables secondary indexes B+Tree metrics", 
defaults = "false")
+public static final String IGNITE_BPLUS_TREE_DISABLE_METRICS = 
"IGNITE_BPLUS_TREE_DISABLE_METRICS";
+
 /**
  * Amount of memory reserved in the heap at node start, which can be 
dropped to increase the chances of success when
  * handling OutOfMemoryError.
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexImpl.java
index d57c76d9cc0..adab519a499 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexImpl.java
@@ -54,11 +54,15 @@ import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cluster.ClusterState.INACTIVE;
 import static org.apache.ignite.failure.FailureType.CRITICAL_ERROR;
+import static 
org.apache.ignite.internal.processors.metric.impl.MetricUtils.metricName;
 
 /**
  * Sorted index implementation.
  */
 public class InlineIndexImpl extends AbstractIndex implements InlineIndex {
+/** */
+public static final String INDEX_METRIC_PREFIX = "index";
+
 /** Unique ID. */
 private final UUID id = UUID.randomUUID();
 
@@ -553,6 +557,7 @@ public class InlineIndexImpl extends AbstractIndex 
implements InlineIndex {
 }
 
 
cctx.kernalContext().metric().remove(stats.metricRegistryName());
+
cctx.kernalContext().metric().remove(metricName(INDEX_METRIC_PREFIX, 
def.idxName().fullName()));
 
 if (cctx.group().persistenceEnabled() ||
 
cctx.shared().kernalContext().state().clusterState().state() != INACTIVE) {
diff --git 
a/modul

[ignite] branch master updated: IGNITE-20353 SQL Calcite: Fix CREATE TABLE ... WITH affinity_key option validation - Fixes #10925.

2023-09-14 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 149e094ffac IGNITE-20353 SQL Calcite: Fix CREATE TABLE ... WITH 
affinity_key option validation - Fixes #10925.
149e094ffac is described below

commit 149e094ffac37bf4a42e4a62f6eac98185a9857b
Author: Aleksey Plekhanov 
AuthorDate: Thu Sep 14 12:28:54 2023 +0300

IGNITE-20353 SQL Calcite: Fix CREATE TABLE ... WITH affinity_key option 
validation - Fixes #10925.

Signed-off-by: Aleksey Plekhanov 
---
 .../prepare/ddl/DdlSqlToCommandConverter.java  | 46 +++
 .../integration/TableDdlIntegrationTest.java   | 66 +-
 2 files changed, 111 insertions(+), 1 deletion(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ddl/DdlSqlToCommandConverter.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ddl/DdlSqlToCommandConverter.java
index 1c8121445ff..c2c4f521d14 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ddl/DdlSqlToCommandConverter.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ddl/DdlSqlToCommandConverter.java
@@ -316,6 +316,52 @@ public class DdlSqlToCommandConverter {
 IgniteQueryErrorCode.PARSING);
 }
 
+// Validate affinity key.
+if (createTblCmd.affinityKey() != null) {
+String affColName = null;
+String val = createTblCmd.affinityKey();
+
+if (val.startsWith("'")) {
+if (val.length() == 1 || !val.endsWith("'")) {
+throw new IgniteSQLException("Affinity key column name 
does not have trailing quote: " + val,
+IgniteQueryErrorCode.PARSING);
+}
+
+val = val.substring(1, val.length() - 1);
+
+if (F.isEmpty(val))
+throw new IgniteSQLException("Affinity key cannot be 
empty", IgniteQueryErrorCode.PARSING);
+
+affColName = val;
+}
+else {
+for (ColumnDefinition col : createTblCmd.columns()) {
+if (col.name().equalsIgnoreCase(val)) {
+if (affColName != null) {
+throw new IgniteSQLException("Ambiguous affinity 
column name, use single quotes " +
+"for case sensitivity: " + val, 
IgniteQueryErrorCode.PARSING);
+}
+
+affColName = col.name();
+}
+}
+}
+
+String affColFinal = affColName;
+
+if (affColName == null || 
createTblCmd.columns().stream().noneMatch(col -> 
affColFinal.equals(col.name( {
+throw new IgniteSQLException("Affinity key column with given 
name not found: " + val,
+IgniteQueryErrorCode.PARSING);
+}
+
+if (!createTblCmd.primaryKeyColumns().contains(affColName)) {
+throw new IgniteSQLException("Affinity key column must be one 
of key columns: " + affColName,
+IgniteQueryErrorCode.PARSING);
+}
+
+createTblCmd.affinityKey(affColName);
+}
+
 return createTblCmd;
 }
 
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
index dc51b74eb75..f385132a7ca 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
@@ -37,7 +37,10 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
 import org.apache.ignite.internal.processors.query.QueryUtils;
+import 
org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor;
 import org.apache.ignite.internal.processors.query.calcite.QueryChecker;
+import org.apache.ignite.internal.processors.query.calcite.schema.IgniteTable;
+import 
org.apache.ignite.internal.processors.query.calcite.trait.IgniteDistribution;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.hamcrest.CustomMatcher;
@@ -229,7 +232,7 @@ public clas

[ignite-extensions] branch master updated: IGNITE-20079 Process additional performance statistics info for queries - Fixes #225.

2023-09-14 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
 new d8ed2e57 IGNITE-20079 Process additional performance statistics info 
for queries - Fixes #225.
d8ed2e57 is described below

commit d8ed2e57e9b89e1ef01c29c8b013dcc4f4e87683
Author: Aleksey Plekhanov 
AuthorDate: Thu Sep 14 11:13:55 2023 +0300

IGNITE-20079 Process additional performance statistics info for queries - 
Fixes #225.

Signed-off-by: Aleksey Plekhanov 
---
 .../performance-statistics-ext/report/js/sqlTab.js |  95 +-
 .../IgnitePerformanceStatisticsHandler.java|  24 +++
 .../handlers/PrintHandler.java |  58 +++
 .../handlers/QueryHandler.java | 192 ++---
 .../PerformanceStatisticsPrinterTest.java  |   6 +-
 .../PerformanceStatisticsReportSelfTest.java   |   6 +-
 6 files changed, 354 insertions(+), 27 deletions(-)

diff --git a/modules/performance-statistics-ext/report/js/sqlTab.js 
b/modules/performance-statistics-ext/report/js/sqlTab.js
index c69b235d..70b2b9c8 100644
--- a/modules/performance-statistics-ext/report/js/sqlTab.js
+++ b/modules/performance-statistics-ext/report/js/sqlTab.js
@@ -44,6 +44,12 @@ $('#sqlStatisticsTable').bootstrapTable({
 sortable: true
 }],
 data: prepareSqlTableData(),
+detailViewIcon: true,
+detailViewByClick: true,
+detailView: true,
+onExpandRow: function (index, row, $detail) {
+buildExpandDetails(row, $detail)
+},
 sortName: 'duration',
 sortOrder: 'desc'
 });
@@ -58,7 +64,9 @@ function prepareSqlTableData() {
 "duration": sqlData["duration"],
 "logicalReads": sqlData["logicalReads"],
 "physicalReads": sqlData["physicalReads"],
-"failures": sqlData["failures"]
+"failures": sqlData["failures"],
+"properties": sqlData["properties"],
+"rows": sqlData["rows"]
 });
 });
 
@@ -99,6 +107,12 @@ $('#topSlowSqlTable').bootstrapTable({
 sortable: true
 }],
 data: prepareSlowSqlTableData(),
+detailViewIcon: true,
+detailViewByClick: true,
+detailView: true,
+onExpandRow: function (index, row, $detail) {
+buildExpandDetails(row, $detail)
+},
 sortName: 'duration',
 sortOrder: 'desc'
 });
@@ -114,9 +128,86 @@ function prepareSlowSqlTableData() {
 nodeId: sqlData["nodeId"],
 logicalReads: sqlData["logicalReads"],
 physicalReads: sqlData["physicalReads"],
-success: sqlData["success"]
+success: sqlData["success"],
+properties: sqlData["properties"],
+rows: sqlData["rows"]
 });
 });
 
 return data;
 }
+
+/** Builds details on expand row. */
+function buildExpandDetails(row, $detail) {
+var hasProperties = row.hasOwnProperty("properties")
+var hasRows = row.hasOwnProperty("rows")
+var htmlProperties = hasProperties ? "Properties" : ""
+var htmlRows = hasRows ? "Rows" : ""
+
+var html = $detail.html(htmlProperties + (hasProperties & hasRows ? 
"" : "") + htmlRows)
+
+if (hasProperties)
+buildPropertiesSubTable(html.find('table.properties'), row.properties)
+
+if (hasRows)
+buildRowsSubTable(html.find('table.rows'), row.rows)
+}
+
+/** Builds query properties subtable. */
+function buildPropertiesSubTable($el, properties) {
+var data = [];
+
+$.each(properties, function (k, prop) {
+data.push({
+name: k,
+value: prop["value"],
+count: prop["count"]
+});
+});
+
+$el.bootstrapTable({
+columns: [{
+field: 'name',
+title: 'Property name',
+sortable: true
+}, {
+field: 'value',
+title: 'Property value',
+sortable: true
+}, {
+field: 'count',
+title: 'Count',
+sortable: true
+}],
+data: data,
+sortName: 'name',
+sortOrder: 'asc'
+})
+}
+
+/** Builds query rows subtable. */
+function buildRowsSubTable($el, rows) {
+var data = [];
+
+$.each(rows, function (k, row) {
+data.push({
+action: k,
+rows: row
+});
+});
+
+$el.bootstrapTable({
+columns: [{
+field: 'action',
+title: 'Action',
+sortable: true
+}, {
+field: 'rows',
+   

[ignite] branch master updated: IGNITE-20079 SQL Calcite: Write additional performance statistics info for queries - Fixes #10880.

2023-09-14 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new b26a4c52f87 IGNITE-20079 SQL Calcite: Write additional performance 
statistics info for queries - Fixes #10880.
b26a4c52f87 is described below

commit b26a4c52f87b09e99ca0ddd0e9e3e3d6ff4d1935
Author: Aleksey Plekhanov 
AuthorDate: Thu Sep 14 11:04:43 2023 +0300

IGNITE-20079 SQL Calcite: Write additional performance statistics info for 
queries - Fixes #10880.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   |  21 +++
 .../query/calcite/QueryRegistryImpl.java   |   2 +-
 .../query/calcite/exec/ExecutionServiceImpl.java   |  27 +++-
 .../query/calcite/exec/LogicalRelImplementor.java  |  22 ++--
 .../query/calcite/exec/rel/ScanStorageNode.java|  27 +++-
 .../query/calcite/exec/tracker/IoTracker.java  |  15 +++
 .../query/calcite/exec/tracker/NoOpIoTracker.java  |  13 ++
 .../tracker/PerformanceStatisticsIoTracker.java|  51 +++-
 .../calcite/prepare/AbstractMultiStepPlan.java |  10 ++
 .../query/calcite/prepare/MultiStepDmlPlan.java|   5 +-
 .../query/calcite/prepare/MultiStepPlan.java   |   5 +
 .../query/calcite/prepare/MultiStepQueryPlan.java  |   5 +-
 .../query/calcite/prepare/PlanExtractor.java   | 108 
 .../query/calcite/prepare/PrepareServiceImpl.java  |  13 +-
 .../query/calcite/prepare/bounds/ExactBounds.java  |   6 +
 .../query/calcite/prepare/bounds/MultiBounds.java  |   8 ++
 .../query/calcite/prepare/bounds/RangeBounds.java  |  12 ++
 .../query/calcite/prepare/bounds/SearchBounds.java |   6 +
 .../query/calcite/schema/CacheTableImpl.java   |   5 +
 .../query/calcite/schema/IgniteTable.java  |   5 +
 .../query/calcite/schema/SystemViewTableImpl.java  |   5 +
 .../query/calcite/sql/IgniteSqlCreateTable.java|  19 ++-
 .../query/calcite/sql/IgniteSqlOption.java |   6 -
 .../calcite/util/ConvertingClosableIterator.java   |  12 +-
 .../integration/SqlDiagnosticIntegrationTest.java  | 111 +---
 .../query/calcite/planner/PlannerTest.java |   2 +-
 .../query/calcite/planner/TestTable.java   |   2 +-
 .../FilePerformanceStatisticsReader.java   |  67 ++
 .../FilePerformanceStatisticsWriter.java   |  47 ++-
 .../performancestatistics/OperationType.java   |  28 +++-
 .../PerformanceStatisticsHandler.java  |  24 
 .../PerformanceStatisticsProcessor.java|  22 
 .../query/running/HeavyQueriesTracker.java |   5 +
 .../query/running/RunningQueryManager.java |  25 
 .../AbstractPerformanceStatisticsTest.java |  12 ++
 .../internal/processors/query/h2/H2QueryInfo.java  |  15 +++
 .../processors/query/h2/H2ResultSetIterator.java   |  26 +++-
 .../processors/query/h2/IgniteH2Indexing.java  |  10 ++
 .../query/h2/twostep/GridMapQueryExecutor.java |  10 ++
 .../query/h2/twostep/GridReduceQueryExecutor.java  |  11 ++
 .../query/h2/twostep/MapQueryResult.java   |  18 +++
 .../PerformanceStatisticsQueryTest.java| 141 +++--
 42 files changed, 913 insertions(+), 71 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 3a675e8882c..7be8acb3ed5 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -36,12 +36,14 @@ import org.apache.calcite.rel.RelCollationTraitDef;
 import org.apache.calcite.rel.core.Aggregate;
 import org.apache.calcite.rel.hint.HintStrategyTable;
 import org.apache.calcite.schema.SchemaPlus;
+import org.apache.calcite.sql.SqlCall;
 import org.apache.calcite.sql.SqlDynamicParam;
 import org.apache.calcite.sql.SqlKind;
 import org.apache.calcite.sql.SqlLiteral;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParser;
+import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.calcite.sql.util.SqlOperatorTables;
 import org.apache.calcite.sql.util.SqlShuttle;
 import org.apache.calcite.sql.validate.SqlValidator;
@@ -94,7 +96,10 @@ import 
org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCach
 import 
org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl;
 import org.apache.ignite.internal.processors.query.calcite.schema.SchemaHolder;
 import 
org.apache.ignite.internal.processors.query.calcite.schema.SchemaHolderImpl;
+import

[ignite] branch master updated: IGNITE-18330 Fix javadoc for tx.suspend()/tx.resume() - Fixes #10604.

2023-09-08 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 24754c21580 IGNITE-18330 Fix javadoc for tx.suspend()/tx.resume() - 
Fixes #10604.
24754c21580 is described below

commit 24754c215803b9b5d0bd97905609dbda05043d3d
Author: bin.yin <616468...@qq.com>
AuthorDate: Fri Sep 8 10:17:59 2023 +0300

IGNITE-18330 Fix javadoc for tx.suspend()/tx.resume() - Fixes #10604.

Signed-off-by: Aleksey Plekhanov 
---
 .../org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java | 2 +-
 .../ignite/internal/processors/cache/GridCacheSharedContext.java  | 2 +-
 .../internal/processors/cache/distributed/near/GridNearTxLocal.java   | 2 +-
 .../src/main/java/org/apache/ignite/transactions/Transaction.java | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
index 0bf6de6e3e6..4fecc335345 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
@@ -205,7 +205,7 @@ public class CacheJdbcPojoStoreFactory implements 
Factory {
 }
 
 /**
- * Suspends transaction. It could be resume later. Supported only for 
optimistic transactions.
+ * Suspends transaction. It could be resume later.
  *
  * @param tx Transaction to suspend.
  * @throws IgniteCheckedException If suspension failed.
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index 7e218c68581..0d76760d1ed 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -3460,7 +3460,7 @@ public class GridNearTxLocal extends 
GridDhtTxLocalAdapter implements GridTimeou
 }
 
 /**
- * Suspends transaction. It could be resumed later. Supported only for 
optimistic transactions.
+ * Suspends transaction. It could be resumed later.
  *
  * @throws IgniteCheckedException If the transaction is in an incorrect 
state, or timed out.
  */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/transactions/Transaction.java 
b/modules/core/src/main/java/org/apache/ignite/transactions/Transaction.java
index e81867b9cac..5e6d9f61f5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/transactions/Transaction.java
+++ b/modules/core/src/main/java/org/apache/ignite/transactions/Transaction.java
@@ -277,14 +277,14 @@ public interface Transaction extends AutoCloseable, 
IgniteAsyncSupport {
 public IgniteFuture rollbackAsync() throws IgniteException;
 
 /**
- * Resume a transaction if it was previously suspended. Supported 
only for optimistic transactions.
+ * Resume a transaction if it was previously suspended.
  *
  * @throws IgniteException If resume failed.
  */
 public void resume() throws IgniteException;
 
 /**
- * Suspends a transaction. It could be resumed later. Supported 
only for optimistic transactions.
+ * Suspends a transaction. It could be resumed later.
  *
  * @throws IgniteException If suspension failed.
  */



[ignite] branch master updated: IGNITE-20194 SQL Calcite: Add explicit commons-codec dependency - Fixes #10889.

2023-08-11 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new b3c45992447 IGNITE-20194 SQL Calcite: Add explicit commons-codec 
dependency - Fixes #10889.
b3c45992447 is described below

commit b3c4599244770c928c712a8e39ad4368a530f8ba
Author: Aleksey Plekhanov 
AuthorDate: Fri Aug 11 12:05:28 2023 +0300

IGNITE-20194 SQL Calcite: Add explicit commons-codec dependency - Fixes 
#10889.

Signed-off-by: Aleksey Plekhanov 
---
 modules/calcite/pom.xml | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/modules/calcite/pom.xml b/modules/calcite/pom.xml
index fd5b57772dc..2090cb2d855 100644
--- a/modules/calcite/pom.xml
+++ b/modules/calcite/pom.xml
@@ -152,6 +152,12 @@
 1.19.0
 
 
+
+commons-codec
+commons-codec
+${commons.codec.version}
+
+
 
 org.immutables
 value



[ignite] branch master updated: IGNITE-19904 Fix assertion on defragmentation - Fixes #10866.

2023-08-04 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new c1b1aa413fc IGNITE-19904 Fix assertion on defragmentation - Fixes 
#10866.
c1b1aa413fc is described below

commit c1b1aa413fcb81216c93c0596117fe9f1a4098b7
Author: Vladimir Steshin 
AuthorDate: Fri Aug 4 09:08:15 2023 +0300

IGNITE-19904 Fix assertion on defragmentation - Fixes #10866.

Signed-off-by: Aleksey Plekhanov 
---
 .../persistence/GridCacheDatabaseSharedManager.java  |  8 +++-
 .../CachePartitionDefragmentationManager.java| 20 +---
 .../cache/persistence/pagemem/PageHeader.java|  2 +-
 3 files changed, 25 insertions(+), 5 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 7dabf06c8dd..aeee241b98f 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -1203,6 +1203,10 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 chpBufSize = cacheSize;
 }
 
+// TODO IGNITE-20138 : Should be actual checkpoint lock checker, 
related to the checkpointer for this data
+// region. Like LightweightCheckpointManager#checkpointer for the 
defragmentation.
+CheckpointLockStateChecker chpLockChecker = this;
+
 PageMemoryImpl pageMem = new PageMemoryImpl(
 wrapMetricsPersistentMemoryProvider(memProvider, regMetrics),
 calculateFragmentSizes(
@@ -1220,10 +1224,12 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 // Write page to disk.
 pageMgr.write(fullId.groupId(), fullId.pageId(), pageBuf, tag, 
true);
 
+// TODO IGNITE-20138 : Should be actual checkpointer, related 
to this data rageion. Like
+// LightweightCheckpointManager#checkpointer for the 
defragmentation.
 getCheckpointer().currentProgress().updateEvictedPages(1);
 },
 trackable,
-this,
+chpLockChecker,
 regMetrics,
 regCfg,
 resolveThrottlingPolicy(),
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/defragmentation/CachePartitionDefragmentationManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/defragmentation/CachePartitionDefragmentationManager.java
index 70de48d2aaf..00c680d3bcb 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/defragmentation/CachePartitionDefragmentationManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/defragmentation/CachePartitionDefragmentationManager.java
@@ -54,6 +54,7 @@ import 
org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapM
 import 
org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager.GridCacheDataStore;
 import 
org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointManager;
 import 
org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointTimeoutLock;
+import 
org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpointer;
 import 
org.apache.ignite.internal.processors.cache.persistence.checkpoint.LightweightCheckpointManager;
 import 
org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager;
 import 
org.apache.ignite.internal.processors.cache.persistence.file.FileVersionCheckingFactory;
@@ -209,10 +210,12 @@ public class CachePartitionDefragmentationManager {
 new LinkedBlockingQueue<>()
 );
 
-completionFut.listen(future -> {
+completionFut.chain(future -> {
 linkMapByPart.values().forEach(LinkMap::close);
 
 linkMapByPart.clear();
+
+return future.result();
 });
 }
 
@@ -225,6 +228,19 @@ public class CachePartitionDefragmentationManager {
 
 nodeCheckpoint.forceCheckpoint("beforeDefragmentation", 
null).futureFor(FINISHED).get();
 
+// The concurrent default checkpointer has various listeners, 
interferes with new dedicated
+// CacheGroupContext for defragmentation and at least clears shared 
CheckpointProgress#clearCounters().
+// Should be properly reconfigured and restarted after the 
defragmentation task to have ability launch
+  

[ignite] branch master updated: IGNITE-20006 SQL Calcite: Move filtering/transforming from scan iterators to ScanNode - Fixes #10852.

2023-08-02 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new de08e0c40a3 IGNITE-20006 SQL Calcite: Move filtering/transforming from 
scan iterators to ScanNode - Fixes #10852.
de08e0c40a3 is described below

commit de08e0c40a32f28d15ead81c33e3e41d1443b5a0
Author: Aleksey Plekhanov 
AuthorDate: Wed Aug 2 09:29:23 2023 +0300

IGNITE-20006 SQL Calcite: Move filtering/transforming from scan iterators 
to ScanNode - Fixes #10852.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/exec/AbstractIndexScan.java  | 25 +--
 .../query/calcite/exec/IndexFirstLastScan.java |  3 +-
 .../processors/query/calcite/exec/IndexScan.java   | 15 +---
 .../query/calcite/exec/LogicalRelImplementor.java  | 33 -
 .../query/calcite/exec/RuntimeHashIndex.java   | 24 ++-
 .../query/calcite/exec/RuntimeSortedIndex.java |  8 +--
 .../query/calcite/exec/SystemViewScan.java | 28 +---
 .../processors/query/calcite/exec/TableScan.java   | 21 +-
 .../query/calcite/exec/rel/IndexSpoolNode.java | 13 ++--
 .../query/calcite/exec/rel/ScanNode.java   | 82 ++
 .../query/calcite/exec/rel/ScanStorageNode.java| 67 ++
 .../query/calcite/schema/CacheIndexImpl.java   | 12 ++--
 .../query/calcite/schema/CacheTableImpl.java   | 17 ++---
 .../query/calcite/schema/IgniteIndex.java  |  4 --
 .../query/calcite/schema/IgniteTable.java  | 10 +--
 .../query/calcite/schema/SystemViewIndexImpl.java  |  6 --
 .../query/calcite/schema/SystemViewTableImpl.java  |  6 +-
 .../calcite/exec/LogicalRelImplementorTest.java| 35 +
 .../integration/AbstractBasicIntegrationTest.java  |  6 +-
 .../integration/IndexScanlIntegrationTest.java | 27 ---
 .../KillQueryCommandDdlIntegrationTest.java|  4 --
 .../integration/RunningQueriesIntegrationTest.java |  6 --
 .../integration/SqlDiagnosticIntegrationTest.java  |  5 ++
 .../integration/TimeoutIntegrationTest.java| 11 ++-
 .../query/calcite/planner/PlannerTest.java | 25 ++-
 .../query/calcite/planner/TestTable.java   |  5 +-
 .../query/running/RunningQueryManager.java | 58 +++
 27 files changed, 257 insertions(+), 299 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/AbstractIndexScan.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/AbstractIndexScan.java
index a180fe7c81d..6e87a7b3e6f 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/AbstractIndexScan.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/AbstractIndexScan.java
@@ -19,8 +19,6 @@ package 
org.apache.ignite.internal.processors.query.calcite.exec;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
-import java.util.function.Function;
-import java.util.function.Predicate;
 import org.apache.calcite.rel.type.RelDataType;
 import org.apache.ignite.IgniteCheckedException;
 import 
org.apache.ignite.internal.cache.query.index.sorted.inline.IndexQueryContext;
@@ -39,15 +37,9 @@ public abstract class AbstractIndexScan 
implements Iterable, A
 /** */
 private final TreeIndex idx;
 
-/** Additional filters. */
-private final Predicate filters;
-
 /** Index scan bounds. */
 private final RangeIterable ranges;
 
-/** */
-private final Function rowTransformer;
-
 /** */
 protected final ExecutionContext ectx;
 
@@ -57,23 +49,18 @@ public abstract class AbstractIndexScan 
implements Iterable, A
 /**
  * @param ectx Execution context.
  * @param idx Physical index.
- * @param filters Additional filters.
  * @param ranges Index scan bounds.
  */
 protected AbstractIndexScan(
 ExecutionContext ectx,
 RelDataType rowType,
 TreeIndex idx,
-Predicate filters,
-RangeIterable ranges,
-Function rowTransformer
+RangeIterable ranges
 ) {
 this.ectx = ectx;
 this.rowType = rowType;
 this.idx = idx;
-this.filters = filters;
 this.ranges = ranges;
-this.rowTransformer = rowTransformer;
 }
 
 /** {@inheritDoc} */
@@ -164,15 +151,7 @@ public abstract class AbstractIndexScan 
implements Iterable, A
 while (next == null && cursor.next()) {
 IdxRow idxRow = cursor.get();
 
-Row r = indexRow2Row(idxRow);
-
-if (filters != null && !filters.test(r))
-continue;
-
-if (rowTransformer != null)
-r = rowTransformer.apply(r);
-
-

[ignite] branch master updated: IGNITE-20010 SQL Calcite: Fix query leak on remote fragment initialization phase failure - Fixes #10849.

2023-07-21 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 8fb4c1ae873 IGNITE-20010 SQL Calcite: Fix query leak on remote 
fragment initialization phase failure - Fixes #10849.
8fb4c1ae873 is described below

commit 8fb4c1ae873b70193726ba310a7f8837e61e68b0
Author: Aleksey Plekhanov 
AuthorDate: Fri Jul 21 17:17:07 2023 +0300

IGNITE-20010 SQL Calcite: Fix query leak on remote fragment initialization 
phase failure - Fixes #10849.

Signed-off-by: Aleksey Plekhanov 
---
 .../internal/processors/query/calcite/Query.java   | 10 -
 .../processors/query/calcite/RootQuery.java|  2 +-
 .../query/calcite/exec/ExecutionServiceImpl.java   | 17 ++--
 .../integration/RunningQueriesIntegrationTest.java | 45 ++
 4 files changed, 58 insertions(+), 16 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
index 38f67f59d1f..815b593cde2 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
@@ -117,12 +117,20 @@ public class Query {
 return initNodeId;
 }
 
+/** */
+public void onError(Throwable failure) {
+tryClose(failure);
+}
+
 /** */
 protected void tryClose(@Nullable Throwable failure) {
 List> fragments = new 
ArrayList<>(this.fragments);
 
 AtomicInteger cntDown = new AtomicInteger(fragments.size());
 
+if (cntDown.get() == 0)
+unregister.accept(this, failure);
+
 for (RunningFragment frag : fragments) {
 frag.context().execute(() -> {
 frag.root().close();
@@ -148,8 +156,6 @@ public class Query {
 if (state == QueryState.INITED) {
 state = QueryState.CLOSING;
 
-assert memoryTracker == null;
-
 try {
 exch.closeQuery(initNodeId, id);
 
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
index fd97c0cf1d8..7bf9df35469 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
@@ -378,7 +378,7 @@ public class RootQuery extends Query implements 
TrackableQuery {
 }
 
 /** */
-public void onError(Throwable error) {
+@Override public void onError(Throwable error) {
 root.onError(error);
 
 tryClose(error);
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
index bfea6190758..0b5e4c48935 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
@@ -805,19 +805,10 @@ public class ExecutionServiceImpl extends 
AbstractService implements Execut
 }
 catch (IgniteCheckedException e) {
 U.error(log, "Error occurred during send error message: " + 
X.getFullStackTrace(e));
-
-IgniteException wrpEx = new IgniteException("Error occurred 
during send error message", e);
-
-e.addSuppressed(ex);
-
-Query qry = (Query)qryReg.query(msg.queryId());
-
-qry.cancel();
-
-throw wrpEx;
 }
-
-throw ex;
+finally {
+qryReg.query(msg.queryId()).onError(ex);
+}
 }
 }
 
@@ -853,7 +844,7 @@ public class ExecutionServiceImpl extends 
AbstractService implements Execut
 );
 }
 
-((RootQuery)qry).onError(e);
+qry.onError(e);
 }
 }
 
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/RunningQueriesIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/RunningQueriesIntegrationTest.java
index c0635c7241d..4aa7a43a1de 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/RunningQueriesIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/a

[ignite-extensions] branch master updated: IGNITE-19748 Fix compilation error of ignite-spring-tx-ext after changes in Ignite

2023-07-18 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
 new 4cdbbb8d IGNITE-19748 Fix compilation error of ignite-spring-tx-ext 
after changes in Ignite
4cdbbb8d is described below

commit 4cdbbb8d2910e5b7aae51d5298c951887d856702
Author: Aleksey Plekhanov 
AuthorDate: Tue Jul 18 14:38:21 2023 +0300

IGNITE-19748 Fix compilation error of ignite-spring-tx-ext after changes in 
Ignite
---
 .../cache/store/spring/CacheSpringStoreSessionListenerSelfTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/modules/spring-tx-ext/spring-tx/src/test/java/org/apache/ignite/cache/store/spring/CacheSpringStoreSessionListenerSelfTest.java
 
b/modules/spring-tx-ext/spring-tx/src/test/java/org/apache/ignite/cache/store/spring/CacheSpringStoreSessionListenerSelfTest.java
index d3db02c9..28ad85fb 100644
--- 
a/modules/spring-tx-ext/spring-tx/src/test/java/org/apache/ignite/cache/store/spring/CacheSpringStoreSessionListenerSelfTest.java
+++ 
b/modules/spring-tx-ext/spring-tx/src/test/java/org/apache/ignite/cache/store/spring/CacheSpringStoreSessionListenerSelfTest.java
@@ -34,7 +34,7 @@ import org.apache.ignite.cache.store.CacheStoreSession;
 import org.apache.ignite.cache.store.CacheStoreSessionListener;
 import org.apache.ignite.cache.store.CacheStoreSessionListenerAbstractSelfTest;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
-import 
org.apache.ignite.internal.processors.query.h2.DistributedSqlConfiguration;
+import 
org.apache.ignite.internal.processors.query.h2.DistributedIndexingConfiguration;
 import org.apache.ignite.internal.processors.query.h2.FunctionsManager;
 import org.apache.ignite.lang.IgniteBiInClosure;
 import org.apache.ignite.resources.CacheStoreSessionResource;
@@ -67,7 +67,7 @@ public class CacheSpringStoreSessionListenerSelfTest extends 
CacheStoreSessionLi
 
 /** {@inheritDoc} */
 @Override protected void afterTestsStopped() throws Exception {
-FunctionManager_removeFunctions.invoke(FunctionsManager.class, 
DistributedSqlConfiguration.DFLT_DISABLED_FUNCS);
+FunctionManager_removeFunctions.invoke(FunctionsManager.class, 
DistributedIndexingConfiguration.DFLT_DISABLED_FUNCS);
 
 super.afterTestsStopped();
 }



[ignite] branch master updated: IGNITE-19748 SQL Calcite: Queries timeout support - Fixes #10827.

2023-07-18 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 6a1cca695c9 IGNITE-19748 SQL Calcite: Queries timeout support - Fixes 
#10827.
6a1cca695c9 is described below

commit 6a1cca695c97de81ab4cec7306b2b912f61e55be
Author: Aleksey Plekhanov 
AuthorDate: Tue Jul 18 13:22:32 2023 +0300

IGNITE-19748 SQL Calcite: Queries timeout support - Fixes #10827.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   |  18 +-
 .../calcite/DistributedCalciteConfiguration.java}  |  24 +--
 .../processors/query/calcite/RootQuery.java|  25 ++-
 .../query/calcite/exec/ExchangeServiceImpl.java|   1 +
 .../query/calcite/exec/ExecutionContext.java   |  16 ++
 .../query/calcite/exec/ExecutionServiceImpl.java   |  12 +-
 .../query/calcite/exec/rel/AbstractNode.java   |   7 +-
 .../processors/query/calcite/exec/rel/Outbox.java  |   5 -
 .../query/calcite/message/QueryStartRequest.java   |  34 +++-
 .../query/calcite/prepare/PrepareServiceImpl.java  |  12 ++
 .../calcite/exec/LogicalRelImplementorTest.java|   1 +
 .../query/calcite/exec/RuntimeSortedIndexTest.java |   1 +
 .../calcite/exec/rel/AbstractExecutionTest.java|   1 +
 .../integration/RunningQueriesIntegrationTest.java |  24 ++-
 .../integration/TimeoutIntegrationTest.java| 181 +
 .../query/calcite/planner/PlannerTest.java |   1 +
 .../ignite/testsuites/IntegrationTestSuite.java|   2 +
 .../cache/query/QueryCancelledException.java   |   7 +
 .../DistributedConfigurationProcessor.java |  11 +-
 .../distributed/DistributedPropertyDispatcher.java |  10 ++
 .../query/DistributedSqlConfiguration.java | 122 ++
 java => DistributedIndexingConfiguration.java} |  58 +--
 .../processors/query/h2/FunctionsManager.java  |   4 +-
 .../processors/query/h2/IgniteH2Indexing.java  |   6 +-
 24 files changed, 483 insertions(+), 100 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 6f8d2f63e1f..1ffdb85a7d1 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -220,6 +220,9 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 /** */
 private final CalciteQueryEngineConfiguration cfg;
 
+/** */
+private final DistributedCalciteConfiguration distrCfg;
+
 /** */
 private volatile boolean started;
 
@@ -253,6 +256,8 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 .findAny()
 .orElse(new CalciteQueryEngineConfiguration());
 }
+
+distrCfg = new DistributedCalciteConfiguration(ctx, log);
 }
 
 /**
@@ -548,6 +553,11 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 ) {
 SqlFieldsQuery fldsQry = qryCtx != null ? 
qryCtx.unwrap(SqlFieldsQuery.class) : null;
 
+long timeout = fldsQry != null ? fldsQry.getTimeout() : 0;
+
+if (timeout <= 0)
+timeout = distrCfg.defaultQueryTimeout();
+
 RootQuery qry = new RootQuery<>(
 sql,
 schemaHolder.schema(schema),
@@ -557,7 +567,8 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 exchangeSvc,
 (q, ex) -> qryReg.unregister(q.id(), ex),
 log,
-queryPlannerTimeout
+queryPlannerTimeout,
+timeout
 );
 
 if (qrys != null)
@@ -665,4 +676,9 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 public CalciteQueryEngineConfiguration config() {
 return cfg;
 }
+
+/** */
+public DistributedCalciteConfiguration distributedConfiguration() {
+return distrCfg;
+}
 }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryCancelledException.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/DistributedCalciteConfiguration.java
similarity index 61%
copy from 
modules/core/src/main/java/org/apache/ignite/cache/query/QueryCancelledException.java
copy to 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/DistributedCalciteConfiguration.java
index 5f0c99146b8..9be7ba34f6c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryCancelledException.java
+++ 
b/modules/calcite/sr

[ignite] branch master updated: IGNITE-19814 SQL Calcite: Fix primary key inline size calculation - Fixes #10819.

2023-07-18 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 621bf869056 IGNITE-19814 SQL Calcite: Fix primary key inline size 
calculation - Fixes #10819.
621bf869056 is described below

commit 621bf869056b7c255416381f239fc602c608492d
Author: Aleksey Plekhanov 
AuthorDate: Tue Jul 18 13:03:41 2023 +0300

IGNITE-19814 SQL Calcite: Fix primary key inline size calculation - Fixes 
#10819.

Signed-off-by: Aleksey Plekhanov 
---
 .../integration/TableDdlIntegrationTest.java   | 35 ++
 .../internal/processors/query/QueryUtils.java  |  4 +++
 2 files changed, 39 insertions(+)

diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
index 57d09f5fe1e..dc51b74eb75 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/TableDdlIntegrationTest.java
@@ -36,6 +36,7 @@ import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
+import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.processors.query.calcite.QueryChecker;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.testframework.GridTestUtils;
@@ -883,6 +884,40 @@ public class TableDdlIntegrationTest extends 
AbstractDdlIntegrationTest {
 }
 }
 
+/**
+ * Creates table with primary key and check inline size.
+ */
+@Test
+public void testPrimaryKeyInlineSize() {
+checkPkInlineSize("create table my_table (id int primary key, val 
varchar)",
+"MY_TABLE", 5);
+
+checkPkInlineSize("create table my_table (id bigint, val varchar, 
primary key (id))",
+"MY_TABLE", 9);
+
+checkPkInlineSize("create table my_table (id int primary key, val 
varchar) WITH \"key_type=Integer\"",
+"MY_TABLE", 5);
+
+checkPkInlineSize("create table my_table (id1 int, id2 smallint, val 
varchar, primary key(id1, id2))",
+"MY_TABLE", 5 + 3);
+}
+
+/** */
+private void checkPkInlineSize(String ddl, String tableName, int 
expectedSize) {
+sql(ddl);
+
+try {
+List> res = sql("SELECT INLINE_SIZE FROM SYS.INDEXES WHERE 
\"TABLE_NAME\" = ? AND INDEX_NAME = ?",
+tableName, QueryUtils.PRIMARY_KEY_INDEX);
+
+assertEquals(1, res.size());
+assertEquals(expectedSize, res.get(0).get(0));
+}
+finally {
+sql("DROP TABLE " + tableName);
+}
+}
+
 /**
  * Matcher to verify that an object of the expected type and matches the 
given predicat.
  *
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
index c0127c2994a..6061fcdcce6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
@@ -620,6 +620,10 @@ public class QueryUtils {
 desc.primaryKeyInlineSize(qe.getPrimaryKeyInlineSize() != null ? 
qe.getPrimaryKeyInlineSize() : -1);
 desc.affinityFieldInlineSize(qe.getAffinityKeyInlineSize() != null 
? qe.getAffinityKeyInlineSize() : -1);
 }
+else {
+desc.primaryKeyInlineSize(-1);
+desc.affinityFieldInlineSize(-1);
+}
 
 return new QueryTypeCandidate(typeId, altTypeId, desc);
 }



[ignite] branch master updated: IGNITE-19818 SQL Calcite: Fix failure on planning when cache size exceeds Integer.MAX_VALUE - Fixes #10804.

2023-07-06 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 490311df216 IGNITE-19818 SQL Calcite: Fix failure on planning when 
cache size exceeds Integer.MAX_VALUE - Fixes #10804.
490311df216 is described below

commit 490311df216adfcb4188e944d63debb357313684
Author: Aleksey Plekhanov 
AuthorDate: Thu Jul 6 19:53:03 2023 +0300

IGNITE-19818 SQL Calcite: Fix failure on planning when cache size exceeds 
Integer.MAX_VALUE - Fixes #10804.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/schema/IgniteStatisticsImpl.java|  2 +-
 .../integration/ServerStatisticsIntegrationTest.java  | 15 +++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteStatisticsImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteStatisticsImpl.java
index 788d6e946ac..e06820adcd8 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteStatisticsImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteStatisticsImpl.java
@@ -122,7 +122,7 @@ public class IgniteStatisticsImpl implements Statistic {
 private void refreshStatsIfNeededEx() {
 if (cliReqCnt.getAndIncrement() % STATS_CLI_UPDATE_THRESHOLD == 0) {
 try {
-primaryRowCnt = 
desc.cacheInfo().cacheContext().cache().size(new CachePeekMode[] 
{CachePeekMode.PRIMARY});
+primaryRowCnt = 
desc.cacheInfo().cacheContext().cache().sizeLong(new CachePeekMode[] 
{CachePeekMode.PRIMARY});
 }
 catch (IgniteCheckedException ignore) {
 // No-op.
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ServerStatisticsIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ServerStatisticsIntegrationTest.java
index bc05ce087b8..f69673b5ab8 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ServerStatisticsIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ServerStatisticsIntegrationTest.java
@@ -37,6 +37,7 @@ import 
org.apache.ignite.internal.processors.query.calcite.QueryChecker;
 import org.apache.ignite.internal.processors.query.calcite.util.Commons;
 import org.apache.ignite.internal.processors.query.stat.StatisticsKey;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.Test;
 
@@ -415,6 +416,20 @@ public class ServerStatisticsIntegrationTest extends 
AbstractBasicIntegrationTes
 }
 }
 
+/**
+ * Check planning with large table size.
+ */
+@Test
+public void testSizeIntOverflow() {
+createAndPopulateTable();
+
+
F.first(grid(0).context().cache().cache(TABLE_NAME).context().offheap().cacheDataStores())
+.updateSize(CU.cacheId(TABLE_NAME), 1L + Integer.MAX_VALUE);
+
+assertQuery(grid(0), "select * from person")
+.matches(QueryChecker.containsTableScan("PUBLIC", 
"PERSON")).check();
+}
+
 /**
  * Clear query cache in specified node.
  *



[ignite] branch master updated: IGNITE-19811 Fix continuous queries backup ack message sending for expired entries - Fixes #10816.

2023-07-06 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 52f1ced7bc3 IGNITE-19811 Fix continuous queries backup ack message 
sending for expired entries - Fixes #10816.
52f1ced7bc3 is described below

commit 52f1ced7bc31a072b95dcd1873a6071fdc10e06d
Author: Aleksey Plekhanov 
AuthorDate: Thu Jul 6 19:46:51 2023 +0300

IGNITE-19811 Fix continuous queries backup ack message sending for expired 
entries - Fixes #10816.

Signed-off-by: Aleksey Plekhanov 
---
 .../CacheContinuousQueryEventBuffer.java   |  5 ++
 .../continuous/CacheContinuousQueryHandler.java| 48 +-
 .../CacheContinuousQueryEntriesExpireTest.java | 77 ++
 .../testsuites/IgniteCacheQuerySelfTestSuite6.java |  4 +-
 4 files changed, 118 insertions(+), 16 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBuffer.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBuffer.java
index 4418d2b7135..9a5c1a9841d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBuffer.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBuffer.java
@@ -338,6 +338,11 @@ public class CacheContinuousQueryEventBuffer {
 return res;
 }
 
+/** */
+int backupQueueSize() {
+return backupQ.size();
+}
+
 /**
  *
  */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 69c0a59c169..deaa70f0f1f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -24,6 +24,7 @@ import java.io.ObjectOutput;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -1385,27 +1386,44 @@ public class CacheContinuousQueryHandler 
implements GridContinuousHandler
 routineId,
 t.get1());
 
+Set sentToNodes = t.get2().size() > 1 ? new 
HashSet<>() : null;
+
 for (AffinityTopologyVersion topVer : t.get2()) {
-for (ClusterNode node : 
ctx.discovery().cacheGroupAffinityNodes(cctx.groupId(), topVer)) {
-if (!node.isLocal()) {
-try {
-cctx.io().send(node, msg, 
GridIoPolicy.SYSTEM_POOL);
-}
-catch (ClusterTopologyCheckedException 
ignored) {
-IgniteLogger log = 
ctx.log(CU.CONTINUOUS_QRY_LOG_CATEGORY);
+if (topVer == null)
+topVer = AffinityTopologyVersion.NONE;
 
-if (log.isDebugEnabled())
-log.debug("Failed to send acknowledge 
message, node left " +
-"[msg=" + msg + ", node=" + node + 
']');
-}
-catch (IgniteCheckedException e) {
-IgniteLogger log = 
ctx.log(CU.CONTINUOUS_QRY_LOG_CATEGORY);
+try {
+for (ClusterNode node : 
ctx.discovery().cacheGroupAffinityNodes(cctx.groupId(), topVer)) {
+if (!node.isLocal()) {
+// Try to send the same message only once 
per node.
+if (sentToNodes != null && 
!sentToNodes.add(nodeId))
+continue;
+
+try {
+cctx.io().send(node, msg, 
GridIoPolicy.SYSTEM_POOL);
+}
+catch (ClusterTopologyCheckedException 
ignored) {
+IgniteLogger log = 
ctx.log(CU.CONTINUOUS_QRY_LOG_CATEGORY);
 
-U.error(log, "Failed to send acknowledge 
message " +
- 

[ignite] branch master updated: IGNITE-19767 Update Ignite dependency: Jetty - Fixes #10784.

2023-06-19 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 3d3862a7272 IGNITE-19767 Update Ignite dependency: Jetty - Fixes 
#10784.
3d3862a7272 is described below

commit 3d3862a7272476fd008fd5f2d9eee2a33db164eb
Author: Aleksandr Nikolaev 
AuthorDate: Mon Jun 19 12:40:07 2023 +0500

IGNITE-19767 Update Ignite dependency: Jetty - Fixes #10784.

Signed-off-by: Aleksey Plekhanov 
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index cfa5b7bde72..57f38c71509 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -103,7 +103,7 @@
 1.0.0
 1.0.6.Final
 16.0.3
-9.4.49.v20220914
+9.4.51.v20230217
 1.13
 1.1.1
 4.5.2



[ignite] branch master updated: IGNITE-19584 SQL Calcite: Fix SQL metrics

2023-06-19 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new c85131866d0 IGNITE-19584 SQL Calcite: Fix SQL metrics
c85131866d0 is described below

commit c85131866d08aa3b4047f1c21fb1262f46003bc6
Author: Aleksey Plekhanov 
AuthorDate: Mon Jun 19 11:51:59 2023 +0500

IGNITE-19584 SQL Calcite: Fix SQL metrics

IGNITE-19586 SQL Calcite: Fix SQL metrics - Fixes #10777.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/monitoring-metrics/new-metrics.adoc |  26 
 .../query/calcite/CalciteQueryProcessor.java   |  39 -
 .../internal/processors/query/calcite/Query.java   |  24 +--
 .../processors/query/calcite/RootQuery.java|  30 ++--
 .../calcite/exec/ExecutionCancelledException.java  |  24 ---
 .../query/calcite/exec/ExecutionServiceImpl.java   |   3 +-
 .../query/calcite/exec/rel/AbstractNode.java   |   6 +-
 .../query/calcite/exec/rel/RootNode.java   |  13 +-
 .../query/calcite/prepare/QueryPlanCacheImpl.java  |  16 +-
 .../integration/RunningQueriesIntegrationTest.java |  41 --
 .../integration/SqlDiagnosticIntegrationTest.java  | 163 +
 .../query}/QueryParserMetricsHolder.java   |   4 +-
 .../internal/processors/query/h2/QueryParser.java  |   1 +
 .../query/h2/QueryParserMetricsHolderSelfTest.java |   3 +-
 14 files changed, 297 insertions(+), 96 deletions(-)

diff --git a/docs/_docs/monitoring-metrics/new-metrics.adoc 
b/docs/_docs/monitoring-metrics/new-metrics.adoc
index 7eae8cd24da..1b260d435e0 100644
--- a/docs/_docs/monitoring-metrics/new-metrics.adoc
+++ b/docs/_docs/monitoring-metrics/new-metrics.adoc
@@ -471,3 +471,29 @@ Register name: `cache`
 |LastDataVer| long | The latest data version on the node.
 |DataVersionClusterId| integer | Data version cluster id.
 |===
+
+== SQL parser metrics
+
+Register name: `sql.parser.cache`
+
+[cols="2,1,3",opts="header"]
+|===
+|Name|Type|Description
+|hits| long | The number of SQL queries that were found in the parsers cache 
(doesn't require to be parsed and planned before execution).
+|misses| long | The number of SQL queries that were parsed and planned.
+|===
+
+== SQL executor metrics
+
+Register name: `sql.queries.user`
+
+[cols="2,1,3",opts="header"]
+|===
+|Name|Type|Description
+|success| long | The number of succesfully executed SQL queries.
+|failed| long | The number of failed SQL queries (including canceled).
+|canceled| long | The number of canceled SQL queries.
+|===
+
+
+
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index c52c8f4180e..6bc9cccf5fa 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -23,6 +23,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.UUID;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.BiFunction;
 import java.util.function.Function;
 import org.apache.calcite.DataContexts;
@@ -49,6 +50,7 @@ import org.apache.calcite.tools.FrameworkConfig;
 import org.apache.calcite.tools.Frameworks;
 import org.apache.ignite.SystemProperty;
 import org.apache.ignite.cache.query.FieldsQueryCursor;
+import org.apache.ignite.cache.query.QueryCancelledException;
 import org.apache.ignite.calcite.CalciteQueryEngineConfiguration;
 import org.apache.ignite.configuration.QueryEngineConfiguration;
 import org.apache.ignite.events.SqlQueryExecutionEvent;
@@ -60,6 +62,7 @@ import 
org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
 import org.apache.ignite.internal.processors.query.QueryContext;
 import org.apache.ignite.internal.processors.query.QueryEngine;
+import org.apache.ignite.internal.processors.query.QueryParserMetricsHolder;
 import org.apache.ignite.internal.processors.query.QueryUtils;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.ExchangeService;
@@ -177,6 +180,9 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 /** */
 private final QueryPlanCache qryPlanCache;
 
+/** */
+private final QueryParserMetricsHolder parserMetrics;
+
 /** */
 private final QueryTaskExecutor taskExecutor;
 
@@ -225,6 +231,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query

[ignite] branch master updated: IGNITE-19588 SQL Calcite: Add long-running queries warnings - Fixes #10769.

2023-06-13 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 77723f0d95c IGNITE-19588 SQL Calcite: Add long-running queries 
warnings - Fixes #10769.
77723f0d95c is described below

commit 77723f0d95c60a780680b2b01ab92c9aff576759
Author: Aleksey Plekhanov 
AuthorDate: Tue Jun 13 18:19:32 2023 +0500

IGNITE-19588 SQL Calcite: Add long-running queries warnings - Fixes #10769.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   |  40 ++---
 .../internal/processors/query/calcite/Query.java   |  32 ++--
 .../processors/query/calcite/QueryRegistry.java|  11 +-
 .../query/calcite/QueryRegistryImpl.java   |  27 ++--
 .../processors/query/calcite}/QueryState.java  |   2 +-
 .../processors/query/calcite/RootQuery.java|  67 ++--
 .../query/calcite/exec/ExchangeService.java|   5 +
 .../query/calcite/exec/ExchangeServiceImpl.java|  16 +-
 .../query/calcite/exec/ExecutionServiceImpl.java   |  33 ++--
 .../query/calcite/exec/rel/RootNode.java   |  62 +++-
 .../calcite/util/ConvertingClosableIterator.java   |  10 +-
 .../processors/query/calcite/CancelTest.java   |   6 +-
 .../exec/rel/TimeCalculationExecutionTest.java | 170 +
 .../KillQueryCommandDdlIntegrationTest.java|   2 +-
 .../integration/RunningQueriesIntegrationTest.java |  25 ++-
 .../integration/SqlDiagnosticIntegrationTest.java  | 106 -
 .../ignite/testsuites/ExecutionTestSuite.java  |   2 +
 .../thin/JdbcThinPartitionAwarenessSelfTest.java   |   2 +-
 ...ThinPartitionAwarenessTransactionsSelfTest.java |   2 +-
 .../internal/managers/IgniteMBeansManager.java |   8 +-
 .../processors/bulkload/BulkLoadProcessor.java |   4 +-
 .../processors/query/GridQueryIndexing.java|  10 +-
 .../processors/query/GridQueryProcessor.java   |   4 +-
 .../internal/processors/query/NoOpQueryEngine.java |  12 --
 .../internal/processors/query/QueryEngine.java |   8 -
 .../query/{ => running}/GridRunningQueryInfo.java  |  13 +-
 .../query/running/HeavyQueriesTracker.java}| 108 +++--
 .../query/{ => running}/QueryHistory.java  |   2 +-
 .../query/{ => running}/QueryHistoryKey.java   |   2 +-
 .../{ => running}/QueryHistoryMetricsValue.java|   2 +-
 .../query/{ => running}/QueryHistoryTracker.java   |   2 +-
 .../query/{ => running}/QueryRunningFuture.java|   2 +-
 .../query/{ => running}/RunningQueryManager.java   |  28 +++-
 .../processors/query/running}/SqlQueryMXBean.java  |   2 +-
 .../query/running}/SqlQueryMXBeanImpl.java |  23 ++-
 .../TrackableQuery.java}   |  19 +--
 .../spi/systemview/view/SqlQueryHistoryView.java   |   2 +-
 .../ignite/spi/systemview/view/SqlQueryView.java   |   2 +-
 .../main/resources/META-INF/classnames.properties  |   3 +-
 .../processors/query/DummyQueryIndexing.java   |   7 +-
 .../query/h2/H2QueryFetchSizeInterceptor.java  |  92 ---
 .../internal/processors/query/h2/H2QueryInfo.java  |  22 ++-
 .../processors/query/h2/H2ResultSetIterator.java   |  13 +-
 .../processors/query/h2/IgniteH2Indexing.java  |  43 ++
 .../processors/query/h2/RegisteredQueryCursor.java |   5 +-
 .../query/h2/twostep/MapQueryResult.java   |  10 +-
 .../query/h2/twostep/msg/GridH2QueryRequest.java   |   3 +-
 .../metric/SqlStatisticsUserQueriesFastTest.java   |   2 +-
 .../metric/SqlStatisticsUserQueriesLongTest.java   |   2 +-
 .../internal/metric/UserQueriesTestBase.java   |   4 +-
 .../cache/CacheSqlQueryValueCopySelfTest.java  |   2 +-
 .../IgniteSqlSkipReducerOnUpdateDmlSelfTest.java   |   1 +
 .../query/KillQueryErrorOnCancelTest.java  |   1 +
 .../query/KillQueryOnClientDisconnectTest.java |   1 +
 .../internal/processors/query/KillQueryTest.java   |   1 +
 .../processors/query/LongRunningQueryTest.java |  22 +--
 .../processors/query/RunningQueriesTest.java   |   1 +
 .../processors/query/SqlQueryHistorySelfTest.java  |   1 +
 .../systemview/SystemViewSecurityTest.java |   2 +-
 59 files changed, 728 insertions(+), 383 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 0579a891dae..c52c8f4180e 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -61,7 +61,6 @@ import 
org.apache.ignite.internal.processors.query.Ignite

[ignite] branch master updated: IGNITE-19378 Documentation: Improve docs related to lazy loading - Fixes #10671.

2023-06-09 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 0fb4ac567d0 IGNITE-19378 Documentation: Improve docs related to lazy 
loading - Fixes #10671.
0fb4ac567d0 is described below

commit 0fb4ac567d0bbd84fab8061279d9e6ab36f3f781
Author: liyujue <18624049...@163.com>
AuthorDate: Fri Jun 9 17:33:19 2023 +0500

IGNITE-19378 Documentation: Improve docs related to lazy loading - Fixes 
#10671.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/SQL/JDBC/jdbc-client-driver.adoc | 10 --
 docs/_docs/SQL/JDBC/jdbc-driver.adoc|  6 --
 docs/_docs/SQL/ODBC/connection-string-dsn.adoc  |  6 --
 docs/_docs/perf-and-troubleshooting/sql-tuning.adoc | 17 +
 4 files changed, 9 insertions(+), 30 deletions(-)

diff --git a/docs/_docs/SQL/JDBC/jdbc-client-driver.adoc 
b/docs/_docs/SQL/JDBC/jdbc-client-driver.adoc
index ee2ffeb955f..e0a343becb2 100644
--- a/docs/_docs/SQL/JDBC/jdbc-client-driver.adoc
+++ b/docs/_docs/SQL/JDBC/jdbc-client-driver.adoc
@@ -139,16 +139,6 @@ However, in cases when you need transactional syntax to 
work (even without trans
 
 |`false`
 
-|`lazy`
-
-|Lazy query execution.
-
-By default, Ignite attempts to fetch the whole query result set to memory and 
send it to the client. For small and medium result sets, this provides optimal 
performance and minimizes the duration of internal database locks, thus 
increasing concurrency.
-
-However, if the result set is too big to fit in the available memory, it can 
lead to excessive GC pauses and even `OutOfMemoryError` errors. Use this flag 
to tell Ignite to fetch the result set lazily, thus minimizing memory 
consumption at the cost of a moderate performance hit.
-
-|`false`
-
 |`skipReducerOnUpdate`
 
 |Enables server side update feature.
diff --git a/docs/_docs/SQL/JDBC/jdbc-driver.adoc 
b/docs/_docs/SQL/JDBC/jdbc-driver.adoc
index 09438c11b6b..e84f5eb9a29 100644
--- a/docs/_docs/SQL/JDBC/jdbc-driver.adoc
+++ b/docs/_docs/SQL/JDBC/jdbc-driver.adoc
@@ -136,12 +136,6 @@ See the link:security/authentication[Authentication] and 
link:sql-reference/ddl#
 | Whether to use `TCP_NODELAY` option.
 |`true`
 
-|`lazy`
-|Lazy query execution.
-By default, Ignite attempts to get and load the whole query result set into 
memory and then send it to the client. For small and medium result sets, this 
provides optimal performance and minimizes the duration of internal database 
locks, thus increasing concurrency.
-However, if the result set is too big to fit in the available memory, then it 
can lead to excessive GC pauses and even 'OutOfMemoryError's. Use this flag to 
tell Ignite to fetch the result set lazily, thus minimizing memory consumption 
at the cost of a moderate performance hit.
-|`false`
-
 |`skipReducerOnUpdate`
 |Enables server side updates.
 When Ignite executes a DML operation, it fetches all the affected intermediate 
rows and sends them to the query initiator (also known as reducer) for 
analysis. Then it prepares batches of updated values to be sent to remote nodes.
diff --git a/docs/_docs/SQL/ODBC/connection-string-dsn.adoc 
b/docs/_docs/SQL/ODBC/connection-string-dsn.adoc
index 6c5e1c46822..e72c27b4876 100644
--- a/docs/_docs/SQL/ODBC/connection-string-dsn.adoc
+++ b/docs/_docs/SQL/ODBC/connection-string-dsn.adoc
@@ -99,12 +99,6 @@ a primary or affinity key, then Ignite makes significant 
performance and network
  on each node participating in the query.
 |`false`
 
-|`LAZY`
-|Lazy query execution.
-By default, Ignite attempts to fetch the whole query result set to memory and 
send it to the client. For small and medium result sets, this provides optimal 
performance and minimize duration of internal database locks, thus increasing 
concurrency.
-However, if the result set is too big to fit in the available memory, then it 
can lead to excessive GC pauses and even `OutOfMemoryError` errors. Use this 
flag to tell Ignite to fetch the result set lazily, thus minimizing memory 
consumption at the cost of a moderate performance hit.
-|`false`
-
 |`SKIP_REDUCER_ON_UPDATE`
 |Enables server side update feature.
 When Ignite executes a DML operation, first, it fetches all the affected 
intermediate rows for analysis to the query initiator (also known as reducer), 
and only then prepares batches of updated values that will be sent to remote 
nodes.
diff --git a/docs/_docs/perf-and-troubleshooting/sql-tuning.adoc 
b/docs/_docs/perf-and-troubleshooting/sql-tuning.adoc
index 695526aa507..bf6f90eb8a5 100644
--- a/docs/_docs/perf-and-troubleshooting/sql-tuning.adoc
+++ b/docs/_docs/perf-and-troubleshooting/sql-tuning.adoc
@@ -78,12 +78,13 @@ with 100+ columns may perform worse than expected.
 
 == Lazy Loading
 
-By default, Ignite attempts to load the whole result set to memory and send it

[ignite] branch master updated: IGNITE-19590 SQL Calcite: Add sensitive information hiding when IGNITE_TO_STRING_INCLUDE_SENSITIVE property set to false - Fixes #10760.

2023-06-05 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 53dba922826 IGNITE-19590 SQL Calcite: Add sensitive information hiding 
when IGNITE_TO_STRING_INCLUDE_SENSITIVE property set to false - Fixes #10760.
53dba922826 is described below

commit 53dba922826bb8f3f5eb648116ba7254795c92b2
Author: Aleksey Plekhanov 
AuthorDate: Mon Jun 5 13:27:00 2023 +0500

IGNITE-19590 SQL Calcite: Add sensitive information hiding when 
IGNITE_TO_STRING_INCLUDE_SENSITIVE property set to false - Fixes #10760.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   | 26 +-
 .../query/calcite/exec/ExecutionServiceImpl.java   |  2 +-
 .../calcite/prepare/AbstractMultiStepPlan.java |  5 +-
 .../{QueryPlan.java => AbstractQueryPlan.java} | 24 +++---
 .../processors/query/calcite/prepare/DdlPlan.java  |  6 +-
 .../query/calcite/prepare/ExplainPlan.java |  6 +-
 .../query/calcite/prepare/FragmentPlan.java|  6 +-
 .../query/calcite/prepare/MultiStepDmlPlan.java|  5 +-
 .../query/calcite/prepare/MultiStepQueryPlan.java  |  5 +-
 .../query/calcite/prepare/PrepareServiceImpl.java  | 11 +--
 .../query/calcite/prepare/QueryPlan.java   |  5 ++
 .../integration/SqlDiagnosticIntegrationTest.java  | 94 ++
 .../query/calcite/planner/PlannerTest.java |  2 +-
 13 files changed, 164 insertions(+), 33 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 7afc6746ed8..0579a891dae 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -35,11 +35,14 @@ import org.apache.calcite.rel.RelCollationTraitDef;
 import org.apache.calcite.rel.core.Aggregate;
 import org.apache.calcite.rel.hint.HintStrategyTable;
 import org.apache.calcite.schema.SchemaPlus;
+import org.apache.calcite.sql.SqlDynamicParam;
 import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParser;
 import org.apache.calcite.sql.util.SqlOperatorTables;
+import org.apache.calcite.sql.util.SqlShuttle;
 import org.apache.calcite.sql.validate.SqlValidator;
 import org.apache.calcite.sql2rel.SqlToRelConverter;
 import org.apache.calcite.tools.FrameworkConfig;
@@ -57,6 +60,7 @@ import 
org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
 import org.apache.ignite.internal.processors.query.QueryContext;
 import org.apache.ignite.internal.processors.query.QueryEngine;
+import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.processors.query.RunningQuery;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.ExchangeService;
@@ -444,7 +448,8 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 
 for (final Object[] batch: batchedParams) {
 FieldsQueryCursor> cur = processQuery(qryCtx, qry ->
-executionSvc.executePlan(qry, planSupplier.apply(qry, batch)), 
schema.getName(), sql, qrys, batch);
+executionSvc.executePlan(qry, planSupplier.apply(qry, batch)), 
schema.getName(),
+removeSensitive(qryNode), qrys, batch);
 
 cursors.add(cur);
 }
@@ -468,7 +473,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 
 if (plan != null) {
 return Collections.singletonList(
-processQuery(qryCtx, qry -> action.apply(qry, plan), 
schema.getName(), sql, null, params)
+processQuery(qryCtx, qry -> action.apply(qry, plan), 
schema.getName(), plan.query(), null, params)
 );
 }
 
@@ -491,7 +496,7 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 plan0 = prepareSvc.prepareSingle(sqlNode, 
qry.planningContext());
 
 return action.apply(qry, plan0);
-}, schema.getName(), sqlNode.toString(), qrys, params);
+}, schema.getName(), removeSensitive(sqlNode), qrys, params);
 
 res.add(singleRes);
 }
@@ -499,6 +504,21 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query

[ignite] branch master updated: IGNITE-19586 SQL Calcite: Fix SQL/Query events - Fixes #10756.

2023-06-01 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new ed3dead1417 IGNITE-19586 SQL Calcite: Fix SQL/Query events - Fixes 
#10756.
ed3dead1417 is described below

commit ed3dead1417b90c48a3bd0c5a75f3259971d049b
Author: Aleksey Plekhanov 
AuthorDate: Thu Jun 1 11:58:44 2023 +0500

IGNITE-19586 SQL Calcite: Fix SQL/Query events - Fixes #10756.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/CalciteQueryProcessor.java   | 13 +++
 .../query/calcite/exec/ExecutionServiceImpl.java   | 41 -
 .../calcite/util/ConvertingClosableIterator.java   |  9 +-
 .../integration/SqlDiagnosticIntegrationTest.java  | 99 ++
 .../java/org/apache/ignite/events/EventType.java   |  3 +-
 .../processors/query/GridQueryProcessor.java   |  2 +-
 .../internal/processors/query/QueryProperties.java | 13 ++-
 7 files changed, 174 insertions(+), 6 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
index 2d543a919a8..7afc6746ed8 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
@@ -48,6 +48,7 @@ import org.apache.ignite.SystemProperty;
 import org.apache.ignite.cache.query.FieldsQueryCursor;
 import org.apache.ignite.calcite.CalciteQueryEngineConfiguration;
 import org.apache.ignite.configuration.QueryEngineConfiguration;
+import org.apache.ignite.events.SqlQueryExecutionEvent;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode;
@@ -98,10 +99,12 @@ import 
org.apache.ignite.internal.processors.query.calcite.type.IgniteTypeSystem
 import org.apache.ignite.internal.processors.query.calcite.util.Commons;
 import org.apache.ignite.internal.processors.query.calcite.util.LifecycleAware;
 import org.apache.ignite.internal.processors.query.calcite.util.Service;
+import org.apache.ignite.internal.processors.security.SecurityUtils;
 import org.apache.ignite.internal.util.typedef.F;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.IgniteSystemProperties.getLong;
+import static org.apache.ignite.events.EventType.EVT_SQL_QUERY_EXECUTION;
 
 /** */
 public class CalciteQueryProcessor extends GridProcessorAdapter implements 
QueryEngine {
@@ -521,6 +524,16 @@ public class CalciteQueryProcessor extends 
GridProcessorAdapter implements Query
 
 qryReg.register(qry);
 
+if (ctx.event().isRecordable(EVT_SQL_QUERY_EXECUTION)) {
+ctx.event().record(new SqlQueryExecutionEvent(
+ctx.discovery().localNode(),
+"SQL query execution.",
+sql,
+params,
+SecurityUtils.securitySubjectId(ctx))
+);
+}
+
 try {
 return action.apply(qry);
 }
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
index 414db873898..6adb151bb3a 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
@@ -35,6 +35,8 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.query.FieldsQueryCursor;
 import org.apache.ignite.calcite.CalciteQueryEngineConfiguration;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.events.CacheQueryReadEvent;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener;
@@ -44,6 +46,7 @@ import 
org.apache.ignite.internal.processors.cache.CacheObjectUtils;
 import org.apache.ignite.internal.processors.cache.CacheObjectValueContext;
 import 
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager;
 import org.apache.ignite.internal.processors.cache.QueryCursorImpl;
+import org.apache.ignite.internal.processors.cache.query.CacheQueryType;
 import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode;
 import org.apache.ignite.internal.processors.failure.FailureProcesso

[ignite] branch master updated: IGNITE-19585 SQL Calcite: Fix performance statistics gathering - Fixes #10751.

2023-05-30 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 071ece86107 IGNITE-19585 SQL Calcite: Fix performance statistics 
gathering - Fixes #10751.
071ece86107 is described below

commit 071ece86107fdff2fdd6dc413128245a5164c84a
Author: Aleksey Plekhanov 
AuthorDate: Tue May 30 14:44:51 2023 +0500

IGNITE-19585 SQL Calcite: Fix performance statistics gathering - Fixes 
#10751.

Signed-off-by: Aleksey Plekhanov 
---
 .../query/calcite/QueryRegistryImpl.java   |   2 +
 .../query/calcite/exec/ExchangeServiceImpl.java|   2 +
 .../query/calcite/exec/ExecutionContext.java   |  11 ++
 .../query/calcite/exec/ExecutionServiceImpl.java   |  25 
 .../query/calcite/exec/rel/ScanNode.java   |   4 +
 .../query/calcite/exec/tracker/IoTracker.java  |  29 +
 .../query/calcite/exec/tracker/NoOpIoTracker.java  |  36 ++
 .../tracker/PerformanceStatisticsIoTracker.java|  68 +++
 .../query/calcite/message/QueryStartRequest.java   |  54 ++---
 .../calcite/exec/LogicalRelImplementorTest.java|   2 +
 .../query/calcite/exec/RuntimeSortedIndexTest.java |   2 +
 .../calcite/exec/rel/AbstractExecutionTest.java|   2 +
 .../integration/SqlDiagnosticIntegrationTest.java  | 128 +
 .../query/calcite/planner/PlannerTest.java |   2 +
 .../ignite/testsuites/IntegrationTestSuite.java|   2 +
 15 files changed, 356 insertions(+), 13 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/QueryRegistryImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/QueryRegistryImpl.java
index d023a258e1a..01929aba1e4 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/QueryRegistryImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/QueryRegistryImpl.java
@@ -65,6 +65,8 @@ public class QueryRegistryImpl extends AbstractService 
implements QueryRegistry
 long locId = qryMgr.register(rootQry.sql(), 
GridCacheQueryType.SQL_FIELDS, rootQry.context().schemaName(),
 false, createCancelToken(qry), initiatorId, false, false, 
false);
 
+qryMgr.trackRequestId(locId);
+
 rootQry.localQueryId(locId);
 
 return qry;
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
index 0cbc13dc164..9f260f1bb45 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExchangeServiceImpl.java
@@ -32,6 +32,7 @@ import 
org.apache.ignite.internal.processors.query.calcite.Query;
 import org.apache.ignite.internal.processors.query.calcite.QueryRegistry;
 import org.apache.ignite.internal.processors.query.calcite.exec.rel.Inbox;
 import org.apache.ignite.internal.processors.query.calcite.exec.rel.Outbox;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.NoOpIoTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.NoOpMemoryTracker;
 import 
org.apache.ignite.internal.processors.query.calcite.message.ErrorMessage;
 import 
org.apache.ignite.internal.processors.query.calcite.message.InboxCloseMessage;
@@ -313,6 +314,7 @@ public class ExchangeServiceImpl extends AbstractService 
implements ExchangeServ
 null),
 null,
 NoOpMemoryTracker.INSTANCE,
+NoOpIoTracker.INSTANCE,
 ImmutableMap.of());
 }
 }
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
index 013134a6099..acac2ed0488 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
@@ -34,6 +34,7 @@ import 
org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactory;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl;
 import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.ExecutionNodeMemoryTracker;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.tracker.IoTracker;
 import

[ignite] branch master updated: IGNITE-19495 Fix failure on sqlOnHeapCache=enabled and more than one index used - Fixes #10722.

2023-05-18 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 82dc1391dd0 IGNITE-19495 Fix failure on sqlOnHeapCache=enabled and 
more than one index used - Fixes #10722.
82dc1391dd0 is described below

commit 82dc1391dd045320b20eb2c64cd101bdabffef2b
Author: Aleksey Plekhanov 
AuthorDate: Thu May 18 11:32:22 2023 +0300

IGNITE-19495 Fix failure on sqlOnHeapCache=enabled and more than one index 
used - Fixes #10722.

Signed-off-by: Aleksey Plekhanov 
---
 .../internal/cache/query/index/sorted/inline/InlineIndexTree.java   | 6 --
 .../ignite/internal/processors/cache/index/H2RowCacheSelfTest.java  | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
index 6117592324a..928284a174c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
@@ -352,8 +352,10 @@ public class InlineIndexTree extends BPlusTree {
 public IndexRowImpl createIndexRow(long link) throws 
IgniteCheckedException {
 IndexRowImpl cachedRow = idxRowCache == null ? null : 
idxRowCache.get(link);
 
-if (cachedRow != null)
-return cachedRow;
+if (cachedRow != null) {
+return cachedRow.rowHandler() == rowHandler() ? cachedRow :
+new IndexRowImpl(rowHandler(), cachedRow.cacheDataRow());
+}
 
 CacheDataRowAdapter row = new CacheDataRowAdapter(link);
 
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
index ed57ce5f95a..79ad353d9c1 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
@@ -446,7 +446,7 @@ public class H2RowCacheSelfTest extends 
AbstractIndexingCommonTest {
  */
 private static class Value {
 /** Long value. */
-@QuerySqlField
+@QuerySqlField(index = true)
 private long lVal;
 
 /** String value. */



[ignite] branch master updated: IGNITE-18832 Add CLIENT_CONNECTION_ATTRIBUTES system view - Fixes #10719.

2023-05-18 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new f9e1ab3aa62 IGNITE-18832 Add CLIENT_CONNECTION_ATTRIBUTES system view 
- Fixes #10719.
f9e1ab3aa62 is described below

commit f9e1ab3aa62e95621afb2ce2be8a049e33d7d3bf
Author: Aleksey Plekhanov 
AuthorDate: Thu May 18 10:56:31 2023 +0300

IGNITE-18832 Add CLIENT_CONNECTION_ATTRIBUTES system view - Fixes #10719.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/monitoring-metrics/system-views.adoc| 14 +
 .../internal/jdbc2/JdbcMetadataSelfTest.java   |  1 +
 .../ignite/jdbc/thin/JdbcThinMetadataSelfTest.java |  4 ++
 .../SystemViewRowAttributeWalkerGenerator.java |  2 +
 .../apache/ignite/util/SystemViewCommandTest.java  |  1 +
 .../ClientConnectionAttributeViewWalker.java   | 67 ++
 .../ClientListenerAbstractConnectionContext.java   |  5 ++
 .../odbc/ClientListenerConnectionContext.java  |  6 ++
 .../processors/odbc/ClientListenerProcessor.java   | 49 
 .../view/ClientConnectionAttributeView.java| 66 +
 .../ignite/internal/metric/SystemViewSelfTest.java | 47 +++
 .../cache/metric/SqlViewExporterSpiTest.java   |  1 +
 .../processors/query/SqlSystemViewsSelfTest.java   | 41 +
 13 files changed, 304 insertions(+)

diff --git a/docs/_docs/monitoring-metrics/system-views.adoc 
b/docs/_docs/monitoring-metrics/system-views.adoc
index 22b7edc7007..cfa604d205f 100644
--- a/docs/_docs/monitoring-metrics/system-views.adoc
+++ b/docs/_docs/monitoring-metrics/system-views.adoc
@@ -389,6 +389,20 @@ This view exposes information about currently opened 
client connections: JDBC, O
 |VERSION | string |  Protocol version
 |===
 
+== CLIENT_CONNECTION_ATTRIBUTES
+
+
+The CLIENT_CONNECTION_ATTRIBUTES view exposes user defined attributes of 
client connections (thin, JDBC, ODBC). Attributes for the connection are 
provided by clients. For example, attributes for java thin client can be 
specified using `ClientConfiguration.setUserAttributes` method.
+
+[{table_opts}]
+|===
+| Column | Data Type | Description
+| CONNECTION_ID | long | ID of the connection
+| NAME | VARCHAR | Name of the attribute
+| VALUE | VARCHAR | Attribute value
+
+|===
+
 == STRIPED_THREADPOOL_QUEUE
 
 This view exposes information about tasks waiting for the execution in the 
system striped thread pool.
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
index 5de43a1b124..a8cf5bc812e 100755
--- 
a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
@@ -342,6 +342,7 @@ public class JdbcMetadataSelfTest extends 
GridCommonAbstractTest {
 "JOBS",
 "SERVICES",
 "CLIENT_CONNECTIONS",
+"CLIENT_CONNECTION_ATTRIBUTES",
 "TRANSACTIONS",
 "VIEWS",
 "TABLE_COLUMNS",
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
index 5fd123a22fa..e8df4956a40 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
@@ -437,6 +437,7 @@ public class JdbcThinMetadataSelfTest extends 
JdbcThinAbstractSelfTest {
 "SYS.NODE_ATTRIBUTES",
 "SYS.TABLES",
 "SYS.CLIENT_CONNECTIONS",
+"SYS.CLIENT_CONNECTION_ATTRIBUTES",
 "SYS.TRANSACTIONS",
 "SYS.VIEWS",
 "SYS.TABLE_COLUMNS",
@@ -928,6 +929,9 @@ public class JdbcThinMetadataSelfTest extends 
JdbcThinAbstractSelfTest {
 "SYS.CLIENT_CONNECTIONS.TYPE.null",
 "SYS.CLIENT_CONNECTIONS.USER.null",
 "SYS.CLIENT_CONNECTIONS.VERSION.null",
+"SYS.CLIENT_CONNECTION_ATTRIBUTES.CONNECTION_ID.null",
+"SYS.CLIENT_CONNECTION_ATTRIBUTES.NAME.null",
+"SYS.CLIENT_CONNECTION_ATTRIBUTES.VALUE.null",
 "SYS.TASKS.EXEC_NAME.null",
 "SYS.TRANSACTIONS.LOCAL_NODE_ID.null",
 "SYS.TRANSACTIONS.STATE.null",
diff --git 
a/modules/codegen/src/main/java/org/apache/ignite/codegen/SystemVi

[ignite] branch master updated: IGNITE-19426 Fix control-utility module location for slim and lgpl assemblies - Fixes #10705.

2023-05-05 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 3bc785a750e IGNITE-19426 Fix control-utility module location for slim 
and lgpl assemblies - Fixes #10705.
3bc785a750e is described below

commit 3bc785a750e13682f7ea59daa3870730e4e2660f
Author: Aleksey Plekhanov 
AuthorDate: Fri May 5 15:24:10 2023 +0300

IGNITE-19426 Fix control-utility module location for slim and lgpl 
assemblies - Fixes #10705.

Signed-off-by: Aleksey Plekhanov 
---
 assembly/dependencies-apache-ignite-lgpl.xml | 2 ++
 assembly/dependencies-apache-ignite-slim.xml | 2 ++
 docs/_docs/setup.adoc| 8 
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/assembly/dependencies-apache-ignite-lgpl.xml 
b/assembly/dependencies-apache-ignite-lgpl.xml
index cd273439857..40fbedf4f27 100644
--- a/assembly/dependencies-apache-ignite-lgpl.xml
+++ b/assembly/dependencies-apache-ignite-lgpl.xml
@@ -34,6 +34,7 @@
 
 ${project.groupId}:ignite-spring
 ${project.groupId}:ignite-indexing
+${project.groupId}:ignite-control-utility
 
 
 true
@@ -133,6 +134,7 @@
 ${project.groupId}:ignite-extdata-platform
 ${project.groupId}:ignite-compatibility
 ${project.groupId}:ignite-sqlline
+${project.groupId}:ignite-control-utility
 
 
 true
diff --git a/assembly/dependencies-apache-ignite-slim.xml 
b/assembly/dependencies-apache-ignite-slim.xml
index 21eb8ac2a19..21d345eda95 100644
--- a/assembly/dependencies-apache-ignite-slim.xml
+++ b/assembly/dependencies-apache-ignite-slim.xml
@@ -34,6 +34,7 @@
 
 ${project.groupId}:ignite-spring
 ${project.groupId}:ignite-indexing
+${project.groupId}:ignite-control-utility
 
 
 true
@@ -146,6 +147,7 @@
 
${project.groupId}:ignite-ml-catboost-model-parser
 ${project.groupId}:ignite-web
 ${project.groupId}:ignite-zookeeper
+${project.groupId}:ignite-control-utility
 
 
 true
diff --git a/docs/_docs/setup.adoc b/docs/_docs/setup.adoc
index 229863cad79..a54918b627e 100644
--- a/docs/_docs/setup.adoc
+++ b/docs/_docs/setup.adoc
@@ -151,8 +151,8 @@ Ignite ships with a number of modules and have a lot of 
extensions that provide
 You can enable modules or extensions one by one, as required.
 
 All modules are included in the binary distribution, but by default they
-are disabled (except for the `ignite-core`, `ignite-spring`, and
-`ignite-indexing` modules). Modules can be found in the `lib/optional`
+are disabled (except for the `ignite-core`, `ignite-spring`, 
`ignite-control-utility` and
+`ignite-indexing` modules). Modules can be found in the `libs/optional`
 directory of the distribution package (each module is located in a
 separate sub-directory).
 
@@ -162,9 +162,9 @@ Depending on how you use Ignite, you can enable modules or 
extensions using one
 the following methods:
 
 * If you use the binary distribution, move the
-`lib/optional/{module-dir}` to the `libs` directory before starting the
+`libs/optional/{module-dir}` to the `libs` directory before starting the
 node.
-* Add libraries from `lib/optional/{module-dir}` to the classpath of
+* Add libraries from `libs/optional/{module-dir}` to the classpath of
 your application.
 * Add a module as a Maven dependency to your project.
 +



svn commit: r61631 - /release/ignite/2.14.0/

2023-05-04 Thread alexpl
Author: alexpl
Date: Thu May  4 16:07:07 2023
New Revision: 61631

Log:
Archiving release 2.14.0

Removed:
release/ignite/2.14.0/



[ignite] branch master updated: IGNITE-19416 Fix JavaThinCompatibilityTest.testCurrentClientToOldServer(Version 2.14.0) - Fixes #10699.

2023-05-04 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 69849bf2084 IGNITE-19416 Fix 
JavaThinCompatibilityTest.testCurrentClientToOldServer(Version 2.14.0) - Fixes 
#10699.
69849bf2084 is described below

commit 69849bf20841ded68d4b5fd4031e236fedecdff0
Author: Aleksey Plekhanov 
AuthorDate: Thu May 4 12:10:41 2023 +0300

IGNITE-19416 Fix 
JavaThinCompatibilityTest.testCurrentClientToOldServer(Version 2.14.0) - Fixes 
#10699.

Signed-off-by: Aleksey Plekhanov 
---
 .../clients/JavaThinCompatibilityTest.java | 23 --
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git 
a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/clients/JavaThinCompatibilityTest.java
 
b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/clients/JavaThinCompatibilityTest.java
index ad666ced379..030257f9714 100644
--- 
a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/clients/JavaThinCompatibilityTest.java
+++ 
b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/clients/JavaThinCompatibilityTest.java
@@ -449,8 +449,8 @@ public class JavaThinCompatibilityTest extends 
AbstractClientCompatibilityTest {
 }
 }
 
-if (clientVer.compareTo(VER_2_15_0) >= 0)
-testDataReplicationOperations(serverVer.compareTo(VER_2_15_0) >= 
0);
+if (minVer.compareTo(VER_2_15_0) >= 0)
+testDataReplicationOperations();
 
 if (clientVer.compareTo(VER_2_14_0) >= 0)
 new JavaThinIndexQueryCompatibilityTest().testIndexQueries(ADDR, 
serverVer.compareTo(VER_2_14_0) >= 0);
@@ -508,8 +508,8 @@ public class JavaThinCompatibilityTest extends 
AbstractClientCompatibilityTest {
 }
 }
 
-/** @param supported {@code True} if feature supported. */
-private void testDataReplicationOperations(boolean supported) {
+/** */
+private void testDataReplicationOperations() {
 X.println(">>>> Testing cache replication");
 
 try (IgniteClient client = Ignition.startClient(new 
ClientConfiguration().setAddresses(ADDR))) {
@@ -521,20 +521,13 @@ public class JavaThinCompatibilityTest extends 
AbstractClientCompatibilityTest {
 
 Map rmvs = F.asMap(1, new 
GridCacheVersion(1, 1, 1, 2));
 
-if (supported) {
-cache.putAllConflict(puts);
+cache.putAllConflict(puts);
 
-assertEquals(1, cache.get(1));
+assertEquals(1, cache.get(1));
 
-cache.removeAllConflict(rmvs);
+cache.removeAllConflict(rmvs);
 
-assertFalse(cache.containsKey(1));
-}
-else {
-assertThrowsWithCause(() -> cache.putAllConflict(puts), 
ClientFeatureNotSupportedByServerException.class);
-
-assertThrowsWithCause(() -> cache.removeAllConflict(rmvs), 
ClientFeatureNotSupportedByServerException.class);
-}
+assertFalse(cache.containsKey(1));
 }
 }
 



[ignite] branch master updated: IGNITE-19313 Update IgniteReleasedVersion for compatibility tests to 2.15.0 - Fixes #10697.

2023-05-04 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 4646ed12165 IGNITE-19313 Update IgniteReleasedVersion for 
compatibility tests to 2.15.0 - Fixes #10697.
4646ed12165 is described below

commit 4646ed12165e3379daf1024f8aeee327b5084dcf
Author: Aleksey Plekhanov 
AuthorDate: Thu May 4 12:06:49 2023 +0300

IGNITE-19313 Update IgniteReleasedVersion for compatibility tests to 2.15.0 
- Fixes #10697.

Signed-off-by: Aleksey Plekhanov 
---
 .../java/org/apache/ignite/compatibility/IgniteReleasedVersion.java  | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/IgniteReleasedVersion.java
 
b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/IgniteReleasedVersion.java
index 0c19b8e8df7..a8aa8c91062 100644
--- 
a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/IgniteReleasedVersion.java
+++ 
b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/IgniteReleasedVersion.java
@@ -73,7 +73,10 @@ public enum IgniteReleasedVersion {
 VER_2_13_0("2.13.0"),
 
 /** */
-VER_2_14_0("2.14.0");
+VER_2_14_0("2.14.0"),
+
+/** */
+VER_2_15_0("2.15.0");
 
 /** Ignite version. */
 private final IgniteProductVersion ver;



[ignite-extensions] branch master updated: IGNITE-19404 Change version of Ignite dependency to 2.16.0-SNAPSHOT - Fixes #213.

2023-05-02 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
 new 3ee130e8 IGNITE-19404 Change version of Ignite dependency to 
2.16.0-SNAPSHOT - Fixes #213.
3ee130e8 is described below

commit 3ee130e8334586be7e4f427631ea7dc9d675127b
Author: Aleksey Plekhanov 
AuthorDate: Tue May 2 19:38:45 2023 +0300

IGNITE-19404 Change version of Ignite dependency to 2.16.0-SNAPSHOT - Fixes 
#213.

Signed-off-by: Aleksey Plekhanov 
---
 parent-internal/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent-internal/pom.xml b/parent-internal/pom.xml
index a13e4d5c..14ca62c3 100644
--- a/parent-internal/pom.xml
+++ b/parent-internal/pom.xml
@@ -26,7 +26,7 @@
 
 org.apache.ignite
 ignite-parent
-2.15.0-SNAPSHOT
+2.16.0-SNAPSHOT
  
 
 



[ignite] annotated tag 2.15.0 created (now fa7f139bf46)

2023-05-02 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a change to annotated tag 2.15.0
in repository https://gitbox.apache.org/repos/asf/ignite.git


  at fa7f139bf46 (tag)
 tagging f98f7f35de6dc76a9b69299154afaa2139a5ec6d (commit)
 replaces master-before-page-memory
  by Aleksey Plekhanov
  on Tue May 2 19:13:36 2023 +0300

- Log -
2.15.0
---

No new revisions were added by this update.



svn commit: r61604 - /dev/ignite/packages_2.15.0-rc0/

2023-05-02 Thread alexpl
Author: alexpl
Date: Tue May  2 15:44:24 2023
New Revision: 61604

Log:
Release 2.15.0: Removed moved to Bintray packages

Removed:
dev/ignite/packages_2.15.0-rc0/



svn commit: r61603 - /dev/ignite/2.15.0-rc0/ /release/ignite/2.15.0/

2023-05-02 Thread alexpl
Author: alexpl
Date: Tue May  2 15:25:57 2023
New Revision: 61603

Log:
Release 2.15.0: Binaries

Added:
release/ignite/2.15.0/
  - copied from r61602, dev/ignite/2.15.0-rc0/
Removed:
dev/ignite/2.15.0-rc0/



svn commit: r61490 - in /dev/ignite/packages_2.15.0-rc0: ./ apache-ignite-2.15.0-1.noarch.rpm apache-ignite_2.15.0-1_all.deb

2023-04-26 Thread alexpl
Author: alexpl
Date: Wed Apr 26 18:01:12 2023
New Revision: 61490

Log:
New RC 2.15.0-rc0: Packages

Added:
dev/ignite/packages_2.15.0-rc0/
dev/ignite/packages_2.15.0-rc0/apache-ignite-2.15.0-1.noarch.rpm   (with 
props)
dev/ignite/packages_2.15.0-rc0/apache-ignite_2.15.0-1_all.deb   (with props)

Added: dev/ignite/packages_2.15.0-rc0/apache-ignite-2.15.0-1.noarch.rpm
==
Binary file - no diff available.

Propchange: dev/ignite/packages_2.15.0-rc0/apache-ignite-2.15.0-1.noarch.rpm
--
svn:mime-type = application/octet-stream

Added: dev/ignite/packages_2.15.0-rc0/apache-ignite_2.15.0-1_all.deb
==
Binary file - no diff available.

Propchange: dev/ignite/packages_2.15.0-rc0/apache-ignite_2.15.0-1_all.deb
--
svn:mime-type = application/octet-stream




svn commit: r61489 - /dev/ignite/2.15.0-rc0/

2023-04-26 Thread alexpl
Author: alexpl
Date: Wed Apr 26 17:30:44 2023
New Revision: 61489

Log:
New RC 2.15.0-rc0: Binaries

Added:
dev/ignite/2.15.0-rc0/
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip   (with props)
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.asc
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.sha512
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip   (with props)
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.asc
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.sha512
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-src.zip   (with props)
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-src.zip.asc
dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-src.zip.sha512
dev/ignite/2.15.0-rc0/apache-ignite-slim-2.15.0-bin.zip   (with props)
dev/ignite/2.15.0-rc0/apache-ignite-slim-2.15.0-bin.zip.asc
dev/ignite/2.15.0-rc0/apache-ignite-slim-2.15.0-bin.zip.sha512

Added: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip
==
Binary file - no diff available.

Propchange: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip
--
svn:mime-type = application/octet-stream

Added: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.asc
==
--- dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.asc (added)
+++ dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.asc Wed Apr 26 17:30:44 
2023
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEZzJcYpE1vxgmQwYy6piGOCfuHP4FAmRJQtcACgkQ6piGOCfu
+HP52IBAAnxRYKL7XbkU3psFmWflDK0Mtmzt9qH+bU28CWTkooSTw4rtGN7A9GkaF
+uEMAB1rdGFVlbDqHtEuEWqgmGHx+TgAehst43zNIlyEv1NMbPmqrdd7B+YU8k4eN
+QO+ShhhsM7c+ewalAbixocxQgASK2EmwUzQVT/CeYKGeWUDmcEq0yZqO0cTRSHAd
+POOhE+IymyGUeEs2aB5J3EJSQh5EBXezdLb0hXoGARpPB22VrLzckPdG6rKa3P0p
+1/QdU2aqZSdsbwPnVGTspjXAizIPcXmHhjPb7WzpAIx5K+h89GwLeehK3ZZcykCS
+54WeVd02lH0mJ7FkV9EtlJCVeCHMI8V7juwqg5XWVMIQ+6ce91xxajVkRsC/N+wV
++1s7I9TPiBsuPn8W8xv05qshaZJkeYigOIb3IaOVi4ZRadMOht4jx+sLw0Ofhdvh
+YhErsN83rT3Hlcd/D7uhHGdXy/zuP9EEeT67TAUG1/rY9x6AQ4elwebxjW4vZ20d
+AufrCZbCaVctOOUa67iQXe+jweX3NKI65zIMwuQgoRWe3t9DAPasS2yDpZYmUBja
+v8GbhVl0s/fPlNwQyhlBR60rOOMOyXCRxSEWf38+5Xllru8BbkyE9lkmvPB0LF7f
+x7gQNg/4NgW3vbMaHeJX8GG54qSSxUqXd8hG/8KRTkTlCe42NXg=
+=CFos
+-END PGP SIGNATURE-

Added: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.sha512
==
--- dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.sha512 (added)
+++ dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-bin.zip.sha512 Wed Apr 26 
17:30:44 2023
@@ -0,0 +1 @@
+4e9d0320faccc31ec9d2f734a6e314dd62e83af02cc1ecdb1e218d4fa7c801185768827504212126082178c9f8593d7afa9c24651c0f597ba8f72c1d0813a23d
  apache-ignite-2.15.0-bin.zip

Added: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip
==
Binary file - no diff available.

Propchange: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip
--
svn:mime-type = application/octet-stream

Added: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.asc
==
--- dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.asc (added)
+++ dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.asc Wed Apr 26 
17:30:44 2023
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEZzJcYpE1vxgmQwYy6piGOCfuHP4FAmRJQtgACgkQ6piGOCfu
+HP6FQBAAhZGrXKgcUz3DPUyJ3AMY+YRmatNJ34fhlDivFLn0/BJVG9x9jZi80Pkf
+3ruETex+QwkdnwBKzke5dlY4b5bym2S/FLO5IATFd3h01YCSHa2LcdNlXVn+jq4+
+VWFLewztNqbn8x/463zkYIj7DyMbvaZbSSquxqmI3S+karqbRKE2BXuwYGU48hMr
+chveeApSsdEj03sbUJDXKGeirI4k1nQQ381lLOuX29u2bArL0+lYY78sJu1BWGXS
+IidgmmtLhTEyGva+7S023PWVZitsVDdbF0m8ZOrwYdpjrhUUfnRRjiDUxsQEtdTz
+50fXYva4ddv03xF2wPSYbw8twb348Ie8r0DcIriP1WTcGwp9D1ogfzubQHdu8dlM
+gOKjKxIaibn9qCH/vyjR+4Gy5ppIlHzjWXzEZUcz1lECheYB7z2ISYATO8n1y5+z
+rCWLCkUbuo9SrUN6bFN8x1GEdmXOyEOSUbrUllEGWRl8i84/IOE/qfT+NiNhMqBU
+1XFcjb3zl39wLJOCkObk2owz3QBvmfVctLrJFuxr8xTTx5oh744VZsPe7L+lgnaR
+EaQXbJO0IIqZgU8t9rpyXnxkM1Y4JOlyYEk3lhWwfuW0pBCOIafEVoxdcTxlfY60
+/jWCvi+CES1fO1G409BN07qUBUdktEBKUYmhXI8lsUliStKesQ8=
+=+m03
+-END PGP SIGNATURE-

Added: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.sha512
==
--- dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.sha512 (added)
+++ dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-nuget.zip.sha512 Wed Apr 26 
17:30:44 2023
@@ -0,0 +1 @@
+972205e0d790449b649909b91cabf595b74fb46950147dfed3f8ff05fe10b4c47873ba11c1115ea0861a5b7852b9890c1ba2263b4a3e00b5ac866ede5b6e2369
  apache-ignite-2.15.0-nuget.zip

Added: dev/ignite/2.15.0-rc0/apache-ignite-2.15.0-src.zip

[ignite] annotated tag 2.15.0-rc0 created (now 32c213a52e7)

2023-04-26 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a change to annotated tag 2.15.0-rc0
in repository https://gitbox.apache.org/repos/asf/ignite.git


  at 32c213a52e7 (tag)
 tagging f98f7f35de6dc76a9b69299154afaa2139a5ec6d (commit)
 replaces master-before-page-memory
  by Aleksey Plekhanov
  on Wed Apr 26 16:38:32 2023 +0300

- Log -
2.15.0-rc0
---

No new revisions were added by this update.



[ignite] branch master updated: IGNITE-19364 Fix DEB/RPM packages assembly script (remove ignitevisorcmd) - Fixes #10666.

2023-04-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 3228804eb70 IGNITE-19364 Fix DEB/RPM packages assembly script (remove 
ignitevisorcmd) - Fixes #10666.
3228804eb70 is described below

commit 3228804eb7086d73ef292bfb1afb64c3426b79e4
Author: Aleksey Plekhanov 
AuthorDate: Tue Apr 25 18:16:37 2023 +0300

IGNITE-19364 Fix DEB/RPM packages assembly script (remove ignitevisorcmd) - 
Fixes #10666.

Signed-off-by: Aleksey Plekhanov 
---
 packaging/rpm/apache-ignite.spec | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/packaging/rpm/apache-ignite.spec b/packaging/rpm/apache-ignite.spec
index 76482271fdb..8e9285c9a12 100644
--- a/packaging/rpm/apache-ignite.spec
+++ b/packaging/rpm/apache-ignite.spec
@@ -83,7 +83,7 @@ case $1 in
 setPermissions
 
 # Install alternatives
-# Commented out until ignitevisorcmd / ignitesqlline is ready to work 
from any user
+# Commented out until ignitesqlline is ready to work from any user
 #update-alternatives --install %{_bindir}/ignitesqlline ignitesqlline 
%{_datadir}/%{name}/bin/sqlline.sh 0
 #update-alternatives --auto ignitesqlline
 #update-alternatives --display ignitesqlline
@@ -131,7 +131,7 @@ case $1 in
 stopIgniteNodes
 
 # Remove alternatives
-# Commented out until ignitevisorcmd / ignitesqlline is ready to work 
from any user
+# Commented out until ignitesqlline is ready to work from any user
 #update-alternatives --remove ignitesqlline 
/usr/share/%{name}/bin/sqlline.sh
 #update-alternatives --display ignitesqlline || true
 ;;
@@ -198,7 +198,6 @@ mkdir -p %{buildroot}%{_bindir}
 # Copy nessessary files and remove *.bat files
 cp -rf benchmarks bin platforms %{buildroot}%{_datadir}/%{name}
 cp -rf docs/* examples %{buildroot}%{_datadir}/doc/%{name}-%{version}
-mv -f %{buildroot}%{_datadir}/%{name}/bin/ignitevisorcmd.sh 
%{buildroot}%{_datadir}/doc/%{name}-%{version}/bin/
 find %{buildroot}%{_datadir}/%{name}/ -name *.bat -exec rm -rf {} \;
 
 # Copy libs to /usr/lib and map them to IGNITE_HOME



[ignite] branch ignite-2.15 updated: IGNITE-19364 Fix DEB/RPM packages assembly script (remove ignitevisorcmd) - Fixes #10666.

2023-04-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new f98f7f35de6 IGNITE-19364 Fix DEB/RPM packages assembly script (remove 
ignitevisorcmd) - Fixes #10666.
f98f7f35de6 is described below

commit f98f7f35de6dc76a9b69299154afaa2139a5ec6d
Author: Aleksey Plekhanov 
AuthorDate: Tue Apr 25 18:16:37 2023 +0300

IGNITE-19364 Fix DEB/RPM packages assembly script (remove ignitevisorcmd) - 
Fixes #10666.

Signed-off-by: Aleksey Plekhanov 
---
 packaging/rpm/apache-ignite.spec | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/packaging/rpm/apache-ignite.spec b/packaging/rpm/apache-ignite.spec
index 76482271fdb..8e9285c9a12 100644
--- a/packaging/rpm/apache-ignite.spec
+++ b/packaging/rpm/apache-ignite.spec
@@ -83,7 +83,7 @@ case $1 in
 setPermissions
 
 # Install alternatives
-# Commented out until ignitevisorcmd / ignitesqlline is ready to work 
from any user
+# Commented out until ignitesqlline is ready to work from any user
 #update-alternatives --install %{_bindir}/ignitesqlline ignitesqlline 
%{_datadir}/%{name}/bin/sqlline.sh 0
 #update-alternatives --auto ignitesqlline
 #update-alternatives --display ignitesqlline
@@ -131,7 +131,7 @@ case $1 in
 stopIgniteNodes
 
 # Remove alternatives
-# Commented out until ignitevisorcmd / ignitesqlline is ready to work 
from any user
+# Commented out until ignitesqlline is ready to work from any user
 #update-alternatives --remove ignitesqlline 
/usr/share/%{name}/bin/sqlline.sh
 #update-alternatives --display ignitesqlline || true
 ;;
@@ -198,7 +198,6 @@ mkdir -p %{buildroot}%{_bindir}
 # Copy nessessary files and remove *.bat files
 cp -rf benchmarks bin platforms %{buildroot}%{_datadir}/%{name}
 cp -rf docs/* examples %{buildroot}%{_datadir}/doc/%{name}-%{version}
-mv -f %{buildroot}%{_datadir}/%{name}/bin/ignitevisorcmd.sh 
%{buildroot}%{_datadir}/doc/%{name}-%{version}/bin/
 find %{buildroot}%{_datadir}/%{name}/ -name *.bat -exec rm -rf {} \;
 
 # Copy libs to /usr/lib and map them to IGNITE_HOME



[ignite] branch ignite-2.15 updated: IGNITE-19312 Apache Ignite 2.15.0 release notes - Fixes #10665.

2023-04-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new b2dd87eed93 IGNITE-19312 Apache Ignite 2.15.0 release notes - Fixes 
#10665.
b2dd87eed93 is described below

commit b2dd87eed93d42fec53bb9391f53e7e990c22261
Author: Aleksey Plekhanov 
AuthorDate: Tue Apr 25 17:13:37 2023 +0300

IGNITE-19312 Apache Ignite 2.15.0 release notes - Fixes #10665.

Signed-off-by: Aleksey Plekhanov 
(cherry picked from commit 2a7cb59571f6dd98bb5e6a4e4c49cb799504a239)
---
 RELEASE_NOTES.txt | 150 ++
 1 file changed, 150 insertions(+)

diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index e0baeab3b1b..b7ef164c981 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,6 +1,156 @@
 Apache Ignite Release Notes
 ===
 
+Apache Ignite In-Memory Distributed Database 2.15.0
+---
+
+(!) WARNINGS:
+* Removed deprecated daemon mode for Ignite nodes.
+* Removed deprecated ignitevisorcmd tool.
+* Removed legacy JMX metric beans (ThreadPoolMXBean, CacheGroupMetricsMXBean, 
CacheMetricsMXBean, PersistenceMetricsMXBean, DataStorageMetricsMXBean,  
DataRegionMetricsMXBean).
+* Removed redundant ignite-spring to ignite-indexing module dependency. If you 
use SQL in Ignite and get Ignite dependency via maven, check that you have 
explicit dependency to the one of the SQL engines (ignite-indexing or 
ignite-calcite).
+* Moved ignite-ssh module to the ignite-extensions.
+* Deprecated lazy flag of SqlFieldsQuery. Default value for this flag is 
changed to 'true'.
+* Operations on atomic caches within transactions are forbidden by default 
now. To allow such operations set system property IGNITE_ALLOW_ATOMIC_OPS_IN_TX 
to 'true'.
+
+Ignite:
+* Added new feature: Incremental snapshots.
+* Added cache objects transformation feature (this can be used to encrypt, 
compress or filter the data).
+* Added support of caches with disk page compression for snapshots.
+* Added ability to copy only primary partitions to snapshot.
+* Added an option to skip snapshot check during restore.
+* Added a snapshot exception if a data streamer is loading data with no 
consistency guarantee.
+* Added storing of snapshot operation warnings to a meta.
+* Added snapshot delta pages sorting.
+* Added partition size and counter check on snapshot create.
+* Added system view for Ignite configuration.
+* Added "Page free space" column to pages lists system views.
+* Added API to kill client (THIN, ODBJ, JDBC) connections.
+* Added metrics for page read time and page replace time.
+* Added thin client affinity hits/misses metric (for partition awareness 
requests).
+* Added distributed property to disable CDC.
+* Added maximum CDC directory size configuration parameter.
+* Added expiry policy support for CDC.
+* Added ability to provide expireTime during CDC conflict resolution.
+* Added LOB and BLOB fields support to CacheJdbcPojoStore.
+* Added missing "--add-opens" for Java 15+ runtime.
+* Added default constructor to PlatformDotNetSessionLockResult to avoid issues 
with ReflectionFactory on some application servers.
+* Added ability to use configured FailureHandler for segmentation handling.
+* Added authorization of .NET and C++ compute tasks.
+* Added authorization of Ignite Cluster Node stop/start/restart operations.
+* Added authorization of SQL user management operations.
+* Added 'ADMIN_CLUSTER_STATE' security permission (now it's the only required 
permission to change cluster state).
+* Granting permissions to system compute tasks by their FQN has been replaced 
with predefined system permissions.
+* Improved rebalance and PME logging (partition ranges disabled).
+* Default metrics exporter is now the JMX exporter.
+* Optimized index rebuilding (disable writing of WAL records for indexes 
during rebuilding).
+* Optimized deactivation of large memory regions with persistence.
+* Optimized zeroing of memory pages.
+* Fixed lambdas serialization on Java 17.
+* Fixed PDS defragmentation on Windows.
+* Fixed JDBC connection leak with cache.invoke() over write-behind enabled 
cache.
+* Fixed an issue that could lead to data corruption of atomic cache when a new 
updated entry is greater than WAL buffer size.
+* Fixed snapshot create operation started from a non baseline node.
+* Fixed snapshot inconsistency if it was taken under cache workload.
+* Fixed snapshot cancel if one path is configured for several nodes.
+* Fixed snapshot restore hanging if the prepare stage fails.
+* Fixed ignite-cdc stopping on client node crush.
+* Fixed ignite-cdc.sh start failure with non-defailt work directory.
+* Fixed CdcMain state committing during index rebuild.
+* Fixed CdcConsumer stopping on ignite-c

[ignite] branch master updated: IGNITE-19312 Apache Ignite 2.15.0 release notes - Fixes #10665.

2023-04-25 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 2a7cb59571f IGNITE-19312 Apache Ignite 2.15.0 release notes - Fixes 
#10665.
2a7cb59571f is described below

commit 2a7cb59571f6dd98bb5e6a4e4c49cb799504a239
Author: Aleksey Plekhanov 
AuthorDate: Tue Apr 25 17:13:37 2023 +0300

IGNITE-19312 Apache Ignite 2.15.0 release notes - Fixes #10665.

Signed-off-by: Aleksey Plekhanov 
---
 RELEASE_NOTES.txt | 150 ++
 1 file changed, 150 insertions(+)

diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index e0baeab3b1b..b7ef164c981 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,6 +1,156 @@
 Apache Ignite Release Notes
 ===
 
+Apache Ignite In-Memory Distributed Database 2.15.0
+---
+
+(!) WARNINGS:
+* Removed deprecated daemon mode for Ignite nodes.
+* Removed deprecated ignitevisorcmd tool.
+* Removed legacy JMX metric beans (ThreadPoolMXBean, CacheGroupMetricsMXBean, 
CacheMetricsMXBean, PersistenceMetricsMXBean, DataStorageMetricsMXBean,  
DataRegionMetricsMXBean).
+* Removed redundant ignite-spring to ignite-indexing module dependency. If you 
use SQL in Ignite and get Ignite dependency via maven, check that you have 
explicit dependency to the one of the SQL engines (ignite-indexing or 
ignite-calcite).
+* Moved ignite-ssh module to the ignite-extensions.
+* Deprecated lazy flag of SqlFieldsQuery. Default value for this flag is 
changed to 'true'.
+* Operations on atomic caches within transactions are forbidden by default 
now. To allow such operations set system property IGNITE_ALLOW_ATOMIC_OPS_IN_TX 
to 'true'.
+
+Ignite:
+* Added new feature: Incremental snapshots.
+* Added cache objects transformation feature (this can be used to encrypt, 
compress or filter the data).
+* Added support of caches with disk page compression for snapshots.
+* Added ability to copy only primary partitions to snapshot.
+* Added an option to skip snapshot check during restore.
+* Added a snapshot exception if a data streamer is loading data with no 
consistency guarantee.
+* Added storing of snapshot operation warnings to a meta.
+* Added snapshot delta pages sorting.
+* Added partition size and counter check on snapshot create.
+* Added system view for Ignite configuration.
+* Added "Page free space" column to pages lists system views.
+* Added API to kill client (THIN, ODBJ, JDBC) connections.
+* Added metrics for page read time and page replace time.
+* Added thin client affinity hits/misses metric (for partition awareness 
requests).
+* Added distributed property to disable CDC.
+* Added maximum CDC directory size configuration parameter.
+* Added expiry policy support for CDC.
+* Added ability to provide expireTime during CDC conflict resolution.
+* Added LOB and BLOB fields support to CacheJdbcPojoStore.
+* Added missing "--add-opens" for Java 15+ runtime.
+* Added default constructor to PlatformDotNetSessionLockResult to avoid issues 
with ReflectionFactory on some application servers.
+* Added ability to use configured FailureHandler for segmentation handling.
+* Added authorization of .NET and C++ compute tasks.
+* Added authorization of Ignite Cluster Node stop/start/restart operations.
+* Added authorization of SQL user management operations.
+* Added 'ADMIN_CLUSTER_STATE' security permission (now it's the only required 
permission to change cluster state).
+* Granting permissions to system compute tasks by their FQN has been replaced 
with predefined system permissions.
+* Improved rebalance and PME logging (partition ranges disabled).
+* Default metrics exporter is now the JMX exporter.
+* Optimized index rebuilding (disable writing of WAL records for indexes 
during rebuilding).
+* Optimized deactivation of large memory regions with persistence.
+* Optimized zeroing of memory pages.
+* Fixed lambdas serialization on Java 17.
+* Fixed PDS defragmentation on Windows.
+* Fixed JDBC connection leak with cache.invoke() over write-behind enabled 
cache.
+* Fixed an issue that could lead to data corruption of atomic cache when a new 
updated entry is greater than WAL buffer size.
+* Fixed snapshot create operation started from a non baseline node.
+* Fixed snapshot inconsistency if it was taken under cache workload.
+* Fixed snapshot cancel if one path is configured for several nodes.
+* Fixed snapshot restore hanging if the prepare stage fails.
+* Fixed ignite-cdc stopping on client node crush.
+* Fixed ignite-cdc.sh start failure with non-defailt work directory.
+* Fixed CdcMain state committing during index rebuild.
+* Fixed CdcConsumer stopping on ignite-cdc.sh stop.
+* Fixed the metric for the number of active client sessions.
+* Fixed calcul

[ignite] branch ignite-2.15 updated: IGNITE-19349 Documentation: Remove docs related to ignitevisorcmd - Fixes #10662.

2023-04-22 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new df9faede59a IGNITE-19349 Documentation: Remove docs related to 
ignitevisorcmd - Fixes #10662.
df9faede59a is described below

commit df9faede59aa0cbb4a4eb90315eaf4e9ff78f6d5
Author: liyujue <18624049...@163.com>
AuthorDate: Sat Apr 22 22:21:29 2023 +0300

IGNITE-19349 Documentation: Remove docs related to ignitevisorcmd - Fixes 
#10662.

Signed-off-by: Aleksey Plekhanov 
(cherry picked from commit 1a69152c2f6bec549410d0f391f00a34e5f19edd)
---
 docs/_data/toc.yaml |  2 --
 docs/_docs/tools/visor-cmd.adoc | 68 -
 2 files changed, 70 deletions(-)

diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml
index 55feaa956a2..4f561ccdabb 100644
--- a/docs/_data/toc.yaml
+++ b/docs/_data/toc.yaml
@@ -458,8 +458,6 @@
   items:
 - title: Control Script
   url: tools/control-script
-- title: Visor CMD
-  url: tools/visor-cmd
 - title: GridGain Control Center
   url: tools/gg-control-center
 - title: SQLLine
diff --git a/docs/_docs/tools/visor-cmd.adoc b/docs/_docs/tools/visor-cmd.adoc
deleted file mode 100644
index 590ec16603c..000
--- a/docs/_docs/tools/visor-cmd.adoc
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.
-= Visor CMD
-
-== Overview
-
-Visor Command Line Interface (CMD) is a command-line tool for Ignite clusters 
monitoring. It provides basic statistics
-about cluster nodes, caches, and compute tasks. It also lets you manage the 
size of your cluster by starting or stopping nodes.
-
-[NOTE]
-
-[discrete]
-=== Ignite Control Script
-The link:tools/control-script[Control Script] is another command-line tool 
developed by the Ignite community.
-It complements and expands capabilities of Visor CMD.
-
-
-image::images/tools/visor-cmd.png[Visor CMD]
-
-== Usage
-
-Ignite ships the `IGNITE_HOME/bin/ignitevisorcmd.{sh|bat}` script that starts 
Visor CMD. To connect Visor CMD to a cluster,
-use the `open` command.
-
-The following commands are supported by Visor. To get full information on a 
command, type `help "cmd"` or `? "cmd"`.
-
-[cols="15%,15%,70%", opts="header"]
-|===
-|Command | Alias | Description
-
-| `ack`| | Acks arguments on all remote nodes.
-| `alert`| | Alerts for user-defined events.
-| `cache`| | Prints cache statistics, clears cache, prints list of all entries 
from cache.
-| `close`| | Disconnects Visor CMD console from the cluster.
-| `config`| | Prints nodes' configurations.
-| `deploy`| | Copies file or folder to remote host.
-| `disco`| | Prints topology change log.
-| `events`| | Prints events from a node.
-| `gc`| | Runs GC on remote nodes.
-| `help`| `?`| Visor CMD's help.
-| `kill`| | Kills or restarts a node.
-| `log`| | Starts or stops the cluster-wide events logging.
-| `mclear`| | Clears Visor CMD's memory variables.
-| `mget`| | Gets Visor CMD' memory variables
-| `mlist`| | Prints Visor CMD's memory variables.
-| `node`| | Prints node's statistics.
-| `open`| | Connects Visor CMD to the cluster.
-| `ping`| | Pings a node.
-| `quit`| | Close Visor CMD's connection.
-| `start`| | Starts or restarts remote nodes.
-| `status`| `!`| Prints detailed Visor CMD's status.
-| `tasks`| | Prints tasks' execution statistics.
-| `top`| | Prints the current cluster topology.
-| `vvm`| | Opens VisualVM for nodes in the cluster.
-|===
-



[ignite] branch master updated: IGNITE-19349 Documentation: Remove docs related to ignitevisorcmd - Fixes #10662.

2023-04-22 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 1a69152c2f6 IGNITE-19349 Documentation: Remove docs related to 
ignitevisorcmd - Fixes #10662.
1a69152c2f6 is described below

commit 1a69152c2f6bec549410d0f391f00a34e5f19edd
Author: liyujue <18624049...@163.com>
AuthorDate: Sat Apr 22 22:21:29 2023 +0300

IGNITE-19349 Documentation: Remove docs related to ignitevisorcmd - Fixes 
#10662.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_data/toc.yaml |  2 --
 docs/_docs/tools/visor-cmd.adoc | 68 -
 2 files changed, 70 deletions(-)

diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml
index 55feaa956a2..4f561ccdabb 100644
--- a/docs/_data/toc.yaml
+++ b/docs/_data/toc.yaml
@@ -458,8 +458,6 @@
   items:
 - title: Control Script
   url: tools/control-script
-- title: Visor CMD
-  url: tools/visor-cmd
 - title: GridGain Control Center
   url: tools/gg-control-center
 - title: SQLLine
diff --git a/docs/_docs/tools/visor-cmd.adoc b/docs/_docs/tools/visor-cmd.adoc
deleted file mode 100644
index 590ec16603c..000
--- a/docs/_docs/tools/visor-cmd.adoc
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.
-= Visor CMD
-
-== Overview
-
-Visor Command Line Interface (CMD) is a command-line tool for Ignite clusters 
monitoring. It provides basic statistics
-about cluster nodes, caches, and compute tasks. It also lets you manage the 
size of your cluster by starting or stopping nodes.
-
-[NOTE]
-
-[discrete]
-=== Ignite Control Script
-The link:tools/control-script[Control Script] is another command-line tool 
developed by the Ignite community.
-It complements and expands capabilities of Visor CMD.
-
-
-image::images/tools/visor-cmd.png[Visor CMD]
-
-== Usage
-
-Ignite ships the `IGNITE_HOME/bin/ignitevisorcmd.{sh|bat}` script that starts 
Visor CMD. To connect Visor CMD to a cluster,
-use the `open` command.
-
-The following commands are supported by Visor. To get full information on a 
command, type `help "cmd"` or `? "cmd"`.
-
-[cols="15%,15%,70%", opts="header"]
-|===
-|Command | Alias | Description
-
-| `ack`| | Acks arguments on all remote nodes.
-| `alert`| | Alerts for user-defined events.
-| `cache`| | Prints cache statistics, clears cache, prints list of all entries 
from cache.
-| `close`| | Disconnects Visor CMD console from the cluster.
-| `config`| | Prints nodes' configurations.
-| `deploy`| | Copies file or folder to remote host.
-| `disco`| | Prints topology change log.
-| `events`| | Prints events from a node.
-| `gc`| | Runs GC on remote nodes.
-| `help`| `?`| Visor CMD's help.
-| `kill`| | Kills or restarts a node.
-| `log`| | Starts or stops the cluster-wide events logging.
-| `mclear`| | Clears Visor CMD's memory variables.
-| `mget`| | Gets Visor CMD' memory variables
-| `mlist`| | Prints Visor CMD's memory variables.
-| `node`| | Prints node's statistics.
-| `open`| | Connects Visor CMD to the cluster.
-| `ping`| | Pings a node.
-| `quit`| | Close Visor CMD's connection.
-| `start`| | Starts or restarts remote nodes.
-| `status`| `!`| Prints detailed Visor CMD's status.
-| `tasks`| | Prints tasks' execution statistics.
-| `top`| | Prints the current cluster topology.
-| `vvm`| | Opens VisualVM for nodes in the cluster.
-|===
-



[ignite] branch ignite-2.15 updated: IGNITE-19347 Bump the log4j2 version because of a performance regression - Fixes #10661.

2023-04-22 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new 2479e25a8da IGNITE-19347 Bump the log4j2 version because of a 
performance regression - Fixes #10661.
2479e25a8da is described below

commit 2479e25a8da5eaf4af079f99a805b7c8e5e775e9
Author: Sergey Korotkov 
AuthorDate: Sat Apr 22 22:12:55 2023 +0300

IGNITE-19347 Bump the log4j2 version because of a performance regression - 
Fixes #10661.

Signed-off-by: Aleksey Plekhanov 
(cherry picked from commit b04fe32f36f9eaa0b4be68dfdc28a53b5bf40058)
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index 16ac012c24c..9485875b837 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -115,7 +115,7 @@
 2.4
 r938
 2.0.1
-2.18.0
+2.20.0
 7.4.0_1
 8.11.2
 1.8.0



[ignite] branch master updated: IGNITE-19347 Bump the log4j2 version because of a performance regression - Fixes #10661.

2023-04-22 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new b04fe32f36f IGNITE-19347 Bump the log4j2 version because of a 
performance regression - Fixes #10661.
b04fe32f36f is described below

commit b04fe32f36f9eaa0b4be68dfdc28a53b5bf40058
Author: Sergey Korotkov 
AuthorDate: Sat Apr 22 22:12:55 2023 +0300

IGNITE-19347 Bump the log4j2 version because of a performance regression - 
Fixes #10661.

Signed-off-by: Aleksey Plekhanov 
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index 264c14b7a4b..cfa5b7bde72 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -115,7 +115,7 @@
 2.4
 r938
 2.0.1
-2.18.0
+2.20.0
 7.4.0_1
 8.11.2
 1.8.0



[ignite] branch ignite-2.15 updated: IGNITE-19311 Update release branch version to 2.15.0 - Fixes #10657.

2023-04-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new e7d2682be88 IGNITE-19311 Update release branch version to 2.15.0 - 
Fixes #10657.
e7d2682be88 is described below

commit e7d2682be88fa5c43842adfe1e36578e0587d24a
Author: Aleksey Plekhanov 
AuthorDate: Thu Apr 20 15:48:36 2023 +0300

IGNITE-19311 Update release branch version to 2.15.0 - Fixes #10657.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_docs/code-snippets/java/pom.xml  | 2 +-
 modules/checkstyle/pom.xml | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/dev-utils/ignite-modules-test/build.gradle | 2 +-
 modules/ducktests/tests/ignitetest/__init__.py | 2 +-
 modules/platforms/cpp/CMakeLists.txt   | 2 +-
 modules/platforms/dotnet/SharedAssemblyInfo.cs | 4 ++--
 parent/pom.xml | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/docs/_docs/code-snippets/java/pom.xml 
b/docs/_docs/code-snippets/java/pom.xml
index 10bd2fcd595..5c902544207 100644
--- a/docs/_docs/code-snippets/java/pom.xml
+++ b/docs/_docs/code-snippets/java/pom.xml
@@ -24,7 +24,7 @@
 1.0.0-SNAPSHOT
 
 UTF-8
-2.13.0-SNAPSHOT
+2.15.0
 
 
 
diff --git a/modules/checkstyle/pom.xml b/modules/checkstyle/pom.xml
index d98286e94bb..8445ae65451 100644
--- a/modules/checkstyle/pom.xml
+++ b/modules/checkstyle/pom.xml
@@ -40,7 +40,7 @@
 1.8
 1.8
 pom-installed.xml
-2.15.0-SNAPSHOT
+2.15.0
 
 
 https://ignite.apache.org
diff --git a/modules/core/src/main/resources/ignite.properties 
b/modules/core/src/main/resources/ignite.properties
index dcc9724cf95..bd95e9a4967 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=2.15.0-SNAPSHOT
+ignite.version=2.15.0
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970
diff --git a/modules/dev-utils/ignite-modules-test/build.gradle 
b/modules/dev-utils/ignite-modules-test/build.gradle
index 9f1b67e9e7e..b200b406106 100644
--- a/modules/dev-utils/ignite-modules-test/build.gradle
+++ b/modules/dev-utils/ignite-modules-test/build.gradle
@@ -26,7 +26,7 @@ sourceCompatibility = 11
 targetCompatibility = 11
 
 ext {
-ignVer = '2.15.0-SNAPSHOT'
+ignVer = '2.15.0'
 moduleName = 'ignite_modules_test'
 }
 
diff --git a/modules/ducktests/tests/ignitetest/__init__.py 
b/modules/ducktests/tests/ignitetest/__init__.py
index 7e63a4278fb..0047b873a41 100644
--- a/modules/ducktests/tests/ignitetest/__init__.py
+++ b/modules/ducktests/tests/ignitetest/__init__.py
@@ -19,4 +19,4 @@
 # due to python version naming restrictions, which are enforced by python 
packaging tools
 # (see  https://www.python.org/dev/peps/pep-0440/)
 #
-__version__ = '2.15.0-SNAPSHOT'
+__version__ = '2.15.0'
diff --git a/modules/platforms/cpp/CMakeLists.txt 
b/modules/platforms/cpp/CMakeLists.txt
index df57eec30c4..df1c2dadec8 100644
--- a/modules/platforms/cpp/CMakeLists.txt
+++ b/modules/platforms/cpp/CMakeLists.txt
@@ -16,7 +16,7 @@
 #
 
 cmake_minimum_required(VERSION 3.6)
-project(Ignite.C++ VERSION 2.15.0.22375)
+project(Ignite.C++ VERSION 2.15.0.23164)
 
 set(CMAKE_CXX_STANDARD 98)
 
diff --git a/modules/platforms/dotnet/SharedAssemblyInfo.cs 
b/modules/platforms/dotnet/SharedAssemblyInfo.cs
index 3169d721eb2..6d7e573fb4c 100644
--- a/modules/platforms/dotnet/SharedAssemblyInfo.cs
+++ b/modules/platforms/dotnet/SharedAssemblyInfo.cs
@@ -24,6 +24,6 @@ using System.Reflection;
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
-[assembly: AssemblyVersion("2.15.0.22375")]
-[assembly: AssemblyFileVersion("2.15.0.22375")]
+[assembly: AssemblyVersion("2.15.0.23164")]
+[assembly: AssemblyFileVersion("2.15.0.23164")]
 [assembly: AssemblyInformationalVersion("2.15.0")]
diff --git a/parent/pom.xml b/parent/pom.xml
index 644fc480370..16ac012c24c 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -49,7 +49,7 @@
 1.8
 1.8
 
-2.15.0-SNAPSHOT
+2.15.0
 
 ${revision}



[ignite] branch master updated: IGNITE-19310 Update Ignite version to 2.16.0-SNAPSHOT - Fixes #10656.

2023-04-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 2465a99825c IGNITE-19310 Update Ignite version to 2.16.0-SNAPSHOT - 
Fixes #10656.
2465a99825c is described below

commit 2465a99825c1dfbbd771120f1b73fb27dcdbe265
Author: Aleksey Plekhanov 
AuthorDate: Thu Apr 20 15:45:43 2023 +0300

IGNITE-19310 Update Ignite version to 2.16.0-SNAPSHOT - Fixes #10656.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_config.yml   | 2 +-
 docs/_docs/code-snippets/java/pom.xml  | 2 +-
 modules/checkstyle/pom.xml | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/dev-utils/ignite-modules-test/build.gradle | 2 +-
 modules/ducktests/tests/ignitetest/__init__.py | 2 +-
 modules/platforms/cpp/CMakeLists.txt   | 2 +-
 modules/platforms/dotnet/SharedAssemblyInfo.cs | 6 +++---
 parent/pom.xml | 2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/docs/_config.yml b/docs/_config.yml
index e658e18378f..598fbc43b77 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -14,7 +14,7 @@
 # limitations under the License.
 exclude: [guidelines.md,  "Gemfile", "Gemfile.lock", README.adoc, 
"_docs/code-snippets", "_docs/includes", '*.sh']
 attrs: _attributes
-  version: 2.15.0
+  version: 2.16.0-SNAPSHOT
   base_url: /docs
   stylesdir: /docs/assets/css
   imagesdir: /docs
diff --git a/docs/_docs/code-snippets/java/pom.xml 
b/docs/_docs/code-snippets/java/pom.xml
index 10bd2fcd595..7fd60e31045 100644
--- a/docs/_docs/code-snippets/java/pom.xml
+++ b/docs/_docs/code-snippets/java/pom.xml
@@ -24,7 +24,7 @@
 1.0.0-SNAPSHOT
 
 UTF-8
-2.13.0-SNAPSHOT
+2.16.0-SNAPSHOT
 
 
 
diff --git a/modules/checkstyle/pom.xml b/modules/checkstyle/pom.xml
index d98286e94bb..deabae39106 100644
--- a/modules/checkstyle/pom.xml
+++ b/modules/checkstyle/pom.xml
@@ -40,7 +40,7 @@
 1.8
 1.8
 pom-installed.xml
-2.15.0-SNAPSHOT
+2.16.0-SNAPSHOT
 
 
 https://ignite.apache.org
diff --git a/modules/core/src/main/resources/ignite.properties 
b/modules/core/src/main/resources/ignite.properties
index dcc9724cf95..8625e2f32a0 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=2.15.0-SNAPSHOT
+ignite.version=2.16.0-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970
diff --git a/modules/dev-utils/ignite-modules-test/build.gradle 
b/modules/dev-utils/ignite-modules-test/build.gradle
index 9f1b67e9e7e..9c2e71143e5 100644
--- a/modules/dev-utils/ignite-modules-test/build.gradle
+++ b/modules/dev-utils/ignite-modules-test/build.gradle
@@ -26,7 +26,7 @@ sourceCompatibility = 11
 targetCompatibility = 11
 
 ext {
-ignVer = '2.15.0-SNAPSHOT'
+ignVer = '2.16.0-SNAPSHOT'
 moduleName = 'ignite_modules_test'
 }
 
diff --git a/modules/ducktests/tests/ignitetest/__init__.py 
b/modules/ducktests/tests/ignitetest/__init__.py
index 7e63a4278fb..2537d7d887e 100644
--- a/modules/ducktests/tests/ignitetest/__init__.py
+++ b/modules/ducktests/tests/ignitetest/__init__.py
@@ -19,4 +19,4 @@
 # due to python version naming restrictions, which are enforced by python 
packaging tools
 # (see  https://www.python.org/dev/peps/pep-0440/)
 #
-__version__ = '2.15.0-SNAPSHOT'
+__version__ = '2.16.0-SNAPSHOT'
diff --git a/modules/platforms/cpp/CMakeLists.txt 
b/modules/platforms/cpp/CMakeLists.txt
index df57eec30c4..4cdfe3e1e25 100644
--- a/modules/platforms/cpp/CMakeLists.txt
+++ b/modules/platforms/cpp/CMakeLists.txt
@@ -16,7 +16,7 @@
 #
 
 cmake_minimum_required(VERSION 3.6)
-project(Ignite.C++ VERSION 2.15.0.22375)
+project(Ignite.C++ VERSION 2.16.0.23164)
 
 set(CMAKE_CXX_STANDARD 98)
 
diff --git a/modules/platforms/dotnet/SharedAssemblyInfo.cs 
b/modules/platforms/dotnet/SharedAssemblyInfo.cs
index 3169d721eb2..934605eeb80 100644
--- a/modules/platforms/dotnet/SharedAssemblyInfo.cs
+++ b/modules/platforms/dotnet/SharedAssemblyInfo.cs
@@ -24,6 +24,6 @@ using System.Reflection;
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
-[assembly: AssemblyVersion("2.15.0.22375")]
-[assembly: AssemblyFileVersion("2.15.0.22375")]
-[assembly: AssemblyInformationalVersion("2.15.0")]
+[assembly: AssemblyVersion("2.16.0.23164")]
+[assembly: AssemblyFileVersion("2.16.0.23164")]
+[assembly: AssemblyInformationalVersion("2.16.0")]
diff --git a/parent/pom.xml b/parent/pom.xml
index 644fc480370..264c14b7a4b 100644
--- a/parent/pom.

[ignite] branch ignite-2.15 updated: IGNITE-17194 Fix update version script - Fixes #9235.

2023-04-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new 79dbfc7ca32 IGNITE-17194 Fix update version script - Fixes #9235.
79dbfc7ca32 is described below

commit 79dbfc7ca32395cbeba04c7e2221863124928274
Author: Aleksey Plekhanov 
AuthorDate: Thu Apr 20 15:06:46 2023 +0300

IGNITE-17194 Fix update version script - Fixes #9235.

Signed-off-by: Aleksey Plekhanov 
(cherry picked from commit 3762c8b0a296f5768795d831c679b07a692e2588)
---
 docs/_config.yml  |   2 +-
 modules/core/pom.xml  |  27 -
 modules/ducktests/pom.xml |  27 -
 modules/platforms/cpp/pom.xml |  68 --
 modules/platforms/dotnet/DEVNOTES.txt |   2 +-
 modules/platforms/dotnet/pom.xml  |  29 --
 pom.xml   | 104 +-
 scripts/update-versions.sh|   2 +-
 8 files changed, 105 insertions(+), 156 deletions(-)

diff --git a/docs/_config.yml b/docs/_config.yml
index 48045baf026..e658e18378f 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -25,7 +25,7 @@ attrs: _attributes
   csharpCodeDir: code-snippets/dotnet
   githubUrl: https://github.com/apache/ignite/tree/master
   githubVersionUrl: https://github.com/apache/ignite/tree/ignite-{version}
-  docSourceUrl: https://github.com/apache/ignite/tree/IGNITE-7595/docs
+  docSourceUrl: https://github.com/apache/ignite/tree/master/docs
 collections:
   docs:
 permalink: /docs/:path:output_ext
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 9913700b807..6981f15671e 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -295,33 +295,6 @@
 false
 
 
-
-
-org.apache.maven.plugins
-maven-antrun-plugin
-
-
-update-versions
-
-run
-
-initialize
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
diff --git a/modules/ducktests/pom.xml b/modules/ducktests/pom.xml
index 8ee6628000a..7855d62bf4a 100644
--- a/modules/ducktests/pom.xml
+++ b/modules/ducktests/pom.xml
@@ -121,33 +121,6 @@
 
 
 
-
-org.apache.maven.plugins
-maven-antrun-plugin
-
-
-update-versions
-
-run
-
-initialize
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 maven-dependency-plugin
 
diff --git a/modules/platforms/cpp/pom.xml b/modules/platforms/cpp/pom.xml
deleted file mode 100644
index 6edf82ad14d..000
--- a/modules/platforms/cpp/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-http://maven.apache.org/POM/4.0.0;
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
-4.0.0
-
-
-org.apache.ignite
-ignite-parent-internal
-${revision}
-../../../parent-internal/pom.xml
-
-
-ignite-cpp
-pom
-
-
-
-
-org.apache.maven.plugins
-maven-antrun-plugin
-
-
-update-versions
-
-run
-
- 

[ignite] branch master updated: IGNITE-17194 Fix update version script - Fixes #9235.

2023-04-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 3762c8b0a29 IGNITE-17194 Fix update version script - Fixes #9235.
3762c8b0a29 is described below

commit 3762c8b0a296f5768795d831c679b07a692e2588
Author: Aleksey Plekhanov 
AuthorDate: Thu Apr 20 15:06:46 2023 +0300

IGNITE-17194 Fix update version script - Fixes #9235.

Signed-off-by: Aleksey Plekhanov 
---
 docs/_config.yml  |   2 +-
 modules/core/pom.xml  |  27 -
 modules/ducktests/pom.xml |  27 -
 modules/platforms/cpp/pom.xml |  68 --
 modules/platforms/dotnet/DEVNOTES.txt |   2 +-
 modules/platforms/dotnet/pom.xml  |  29 --
 pom.xml   | 104 +-
 scripts/update-versions.sh|   2 +-
 8 files changed, 105 insertions(+), 156 deletions(-)

diff --git a/docs/_config.yml b/docs/_config.yml
index 48045baf026..e658e18378f 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -25,7 +25,7 @@ attrs: _attributes
   csharpCodeDir: code-snippets/dotnet
   githubUrl: https://github.com/apache/ignite/tree/master
   githubVersionUrl: https://github.com/apache/ignite/tree/ignite-{version}
-  docSourceUrl: https://github.com/apache/ignite/tree/IGNITE-7595/docs
+  docSourceUrl: https://github.com/apache/ignite/tree/master/docs
 collections:
   docs:
 permalink: /docs/:path:output_ext
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 9913700b807..6981f15671e 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -295,33 +295,6 @@
 false
 
 
-
-
-org.apache.maven.plugins
-maven-antrun-plugin
-
-
-update-versions
-
-run
-
-initialize
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
diff --git a/modules/ducktests/pom.xml b/modules/ducktests/pom.xml
index 8ee6628000a..7855d62bf4a 100644
--- a/modules/ducktests/pom.xml
+++ b/modules/ducktests/pom.xml
@@ -121,33 +121,6 @@
 
 
 
-
-org.apache.maven.plugins
-maven-antrun-plugin
-
-
-update-versions
-
-run
-
-initialize
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 maven-dependency-plugin
 
diff --git a/modules/platforms/cpp/pom.xml b/modules/platforms/cpp/pom.xml
deleted file mode 100644
index 6edf82ad14d..000
--- a/modules/platforms/cpp/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-http://maven.apache.org/POM/4.0.0;
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
-4.0.0
-
-
-org.apache.ignite
-ignite-parent-internal
-${revision}
-../../../parent-internal/pom.xml
-
-
-ignite-cpp
-pom
-
-
-
-
-org.apache.maven.plugins
-maven-antrun-plugin
-
-
-update-versions
-
-run
-
- 

[ignite] branch ignite-2.15 updated: IGNITE-19309 Update DEB & RPM package version to 2.15.0 - Fixes #10655.

2023-04-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new 52170819598 IGNITE-19309 Update DEB & RPM package version to 2.15.0 - 
Fixes #10655.
52170819598 is described below

commit 52170819598b784f13fd1f02bb3681cbc166138b
Author: Aleksey Plekhanov 
AuthorDate: Thu Apr 20 11:38:02 2023 +0300

IGNITE-19309 Update DEB & RPM package version to 2.15.0 - Fixes #10655.

Signed-off-by: Aleksey Plekhanov 
(cherry picked from commit 0093f855be3bcaca4e25f96953557415b2720de4)
---
 packaging/deb/changelog  | 6 ++
 packaging/rpm/apache-ignite.spec | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/packaging/deb/changelog b/packaging/deb/changelog
index b94a1c6a851..06c29aae90c 100644
--- a/packaging/deb/changelog
+++ b/packaging/deb/changelog
@@ -1,3 +1,9 @@
+apache-ignite (2.15.0-1) unstable; urgency=low
+
+  * Updated Apache Ignite to version 2.15.0
+
+ -- Alexey Plekhanov   Thu, 20 Apr 2023 11:00:00 +0300
+
 apache-ignite (2.14.0-1) unstable; urgency=low
 
   * Updated Apache Ignite to version 2.14.0
diff --git a/packaging/rpm/apache-ignite.spec b/packaging/rpm/apache-ignite.spec
index d3b980625e9..76482271fdb 100644
--- a/packaging/rpm/apache-ignite.spec
+++ b/packaging/rpm/apache-ignite.spec
@@ -12,7 +12,7 @@
 #
 
 Name: apache-ignite
-Version:  2.14.0
+Version:  2.15.0
 Release:  1
 Summary:  Apache Ignite In-Memory Computing, Database and Caching 
Platform
 Group:Development/System



[ignite] branch master updated: IGNITE-19309 Update DEB & RPM package version to 2.15.0 - Fixes #10655.

2023-04-20 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 0093f855be3 IGNITE-19309 Update DEB & RPM package version to 2.15.0 - 
Fixes #10655.
0093f855be3 is described below

commit 0093f855be3bcaca4e25f96953557415b2720de4
Author: Aleksey Plekhanov 
AuthorDate: Thu Apr 20 11:38:02 2023 +0300

IGNITE-19309 Update DEB & RPM package version to 2.15.0 - Fixes #10655.

Signed-off-by: Aleksey Plekhanov 
---
 packaging/deb/changelog  | 6 ++
 packaging/rpm/apache-ignite.spec | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/packaging/deb/changelog b/packaging/deb/changelog
index b94a1c6a851..06c29aae90c 100644
--- a/packaging/deb/changelog
+++ b/packaging/deb/changelog
@@ -1,3 +1,9 @@
+apache-ignite (2.15.0-1) unstable; urgency=low
+
+  * Updated Apache Ignite to version 2.15.0
+
+ -- Alexey Plekhanov   Thu, 20 Apr 2023 11:00:00 +0300
+
 apache-ignite (2.14.0-1) unstable; urgency=low
 
   * Updated Apache Ignite to version 2.14.0
diff --git a/packaging/rpm/apache-ignite.spec b/packaging/rpm/apache-ignite.spec
index d3b980625e9..76482271fdb 100644
--- a/packaging/rpm/apache-ignite.spec
+++ b/packaging/rpm/apache-ignite.spec
@@ -12,7 +12,7 @@
 #
 
 Name: apache-ignite
-Version:  2.14.0
+Version:  2.15.0
 Release:  1
 Summary:  Apache Ignite In-Memory Computing, Database and Caching 
Platform
 Group:Development/System



[ignite] branch ignite-2.15 updated: IGNITE-19308 Change copyright to 2023 - Fixes #10653.

2023-04-19 Thread alexpl
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
 new 6ac7e124764 IGNITE-19308 Change copyright to 2023 - Fixes #10653.
6ac7e124764 is described below

commit 6ac7e124764a19b6e31e540cb59bd2b8b30b2f37
Author: Aleksey Plekhanov 
AuthorDate: Wed Apr 19 18:14:58 2023 +0300

IGNITE-19308 Change copyright to 2023 - Fixes #10653.

Signed-off-by: Aleksey Plekhanov 
(cherry picked from commit b5e73970febcce45a9dfbcc6e1bed0cf04313177)
---
 NOTICE | 2 +-
 assembly/NOTICE_IGNITE | 2 +-
 modules/core/src/main/java/META-INF/NOTICE | 2 +-
 modules/platforms/dotnet/SharedAssemblyInfo.cs | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/NOTICE b/NOTICE
index d232b97e369..2589f6776e9 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Ignite
-Copyright 2022 The Apache Software Foundation
+Copyright 2023 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/assembly/NOTICE_IGNITE b/assembly/NOTICE_IGNITE
index 8aa27149349..b257ca8095d 100644
--- a/assembly/NOTICE_IGNITE
+++ b/assembly/NOTICE_IGNITE
@@ -1,5 +1,5 @@
 Apache Ignite
-Copyright 2022 The Apache Software Foundation
+Copyright 2023 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/modules/core/src/main/java/META-INF/NOTICE 
b/modules/core/src/main/java/META-INF/NOTICE
index d232b97e369..2589f6776e9 100644
--- a/modules/core/src/main/java/META-INF/NOTICE
+++ b/modules/core/src/main/java/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Ignite
-Copyright 2022 The Apache Software Foundation
+Copyright 2023 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/modules/platforms/dotnet/SharedAssemblyInfo.cs 
b/modules/platforms/dotnet/SharedAssemblyInfo.cs
index 9780574487f..3169d721eb2 100644
--- a/modules/platforms/dotnet/SharedAssemblyInfo.cs
+++ b/modules/platforms/dotnet/SharedAssemblyInfo.cs
@@ -20,7 +20,7 @@ using System.Reflection;
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Apache Software Foundation")]
 [assembly: AssemblyProduct("Apache Ignite.NET")]
-[assembly: AssemblyCopyright("Copyright 2022")]
+[assembly: AssemblyCopyright("Copyright 2023")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 



  1   2   3   4   5   6   >