(ignite-3) branch main updated: IGNITE-22054 Fix ItMultipleLocksTest#test (#3632)
This is an automated email from the ASF dual-hosted git repository. sanpwc pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git The following commit(s) were added to refs/heads/main by this push: new 9036b30bef IGNITE-22054 Fix ItMultipleLocksTest#test (#3632) 9036b30bef is described below commit 9036b30befc3b8434a51cda94efa8d036413693f Author: Alexander Lapin AuthorDate: Fri Apr 19 18:56:18 2024 +0300 IGNITE-22054 Fix ItMultipleLocksTest#test (#3632) --- .../cpp/tests/client-test/compute_test.cpp | 2 +- .../ignite/internal/tx/impl/HeapLockManager.java | 75 ++ 2 files changed, 36 insertions(+), 41 deletions(-) diff --git a/modules/platforms/cpp/tests/client-test/compute_test.cpp b/modules/platforms/cpp/tests/client-test/compute_test.cpp index a7feaf9efc..a58762c712 100644 --- a/modules/platforms/cpp/tests/client-test/compute_test.cpp +++ b/modules/platforms/cpp/tests/client-test/compute_test.cpp @@ -458,7 +458,7 @@ TEST_F(compute_test, job_execution_status_executing) { EXPECT_EQ(job_state::EXECUTING, status->state); } -TEST_F(compute_test, job_execution_status_completed) { +TEST_F(compute_test, DISABLED_job_execution_status_completed) { const std::int32_t sleep_ms = 1; auto execution = m_client.get_compute().submit({get_node(1)}, {}, SLEEP_JOB, {sleep_ms}, {}); diff --git a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java index 8c4cce4c10..a1222eb00a 100644 --- a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java +++ b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java @@ -189,17 +189,7 @@ public class HeapLockManager extends AbstractEventProducer { -// Mapping may already change. -if (v != state || !v.markedForRemove) { -return v; -} - -// markedForRemove state should be cleared on entry reuse to avoid race. -v.key = null; -empty.add(v); -return null; -}); +locks.compute(lock.lockKey(), (k, v) -> adjustLockState(state, v)); } } @@ -215,16 +205,7 @@ public class HeapLockManager extends AbstractEventProducer { -// Mapping may already change. -if (v != state || !v.markedForRemove) { -return v; -} - -v.key = null; -empty.add(v); -return null; -}); +locks.compute(lockKey, (k, v) -> adjustLockState(state, v)); } } @@ -237,16 +218,7 @@ public class HeapLockManager extends AbstractEventProducer { -// Mapping may already change. -if (v != state || !v.markedForRemove) { -return v; -} - -v.key = null; -empty.add(v); -return null; -}); +locks.compute(key, (k, v) -> adjustLockState(state, v)); } } } @@ -293,6 +265,7 @@ public class HeapLockManager extends AbstractEventProducer false); } +@Nullable +private LockState adjustLockState(LockState state, LockState v) { +// Mapping may already change. +if (v != state) { +return v; +} + +synchronized (v.waiters) { +if (v.waiters.isEmpty()) { +v.markedForRemove = true; +v.key = null; +empty.add(v); +return null; +} else { +return v; +} +} +} + /** * A lock state. */ @@ -425,8 +417,15 @@ public class HeapLockManager extends AbstractEventProducer(waiter.fut, waiter.lockMode()); } -public synchronized int waitersCount() { -return waiters.size(); +/** + * Returns waiters count. + * + * @return waiters count. + */ +public int waitersCount() { +synchronized (waiters) { +return waiters.size(); +} } /** @@ -523,7 +522,7 @@ public class HeapLockManager extends AbstractEventProducer
(ignite-3) branch dependabot/gradle/net.bytebuddy-byte-buddy-1.14.13 created (now b7d01ebbf1)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/gradle/net.bytebuddy-byte-buddy-1.14.13 in repository https://gitbox.apache.org/repos/asf/ignite-3.git at b7d01ebbf1 Bump net.bytebuddy:byte-buddy from 1.14.12 to 1.14.13 No new revisions were added by this update.
(ignite-3) branch dependabot/gradle/com.github.spotbugs-6.0.12 created (now 2ff2eda43a)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/gradle/com.github.spotbugs-6.0.12 in repository https://gitbox.apache.org/repos/asf/ignite-3.git at 2ff2eda43a Bump com.github.spotbugs from 6.0.8 to 6.0.12 No new revisions were added by this update.
(ignite-extensions) 01/01: IGNITE-22080 Fix ConflictResolver fails on debug logging (#261)
This is an automated email from the ASF dual-hosted git repository. timoninmaxim pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git commit d3692283f8e47d9a5527836ad2f085b4120325c8 Merge: af7fdb09 88236cae Author: Maksim Timonin AuthorDate: Fri Apr 19 17:27:20 2024 +0300 IGNITE-22080 Fix ConflictResolver fails on debug logging (#261) .../CacheVersionConflictResolverImpl.java| 2 +- .../DebugCacheVersionConflictResolverImpl.java | 16 ++-- 2 files changed, 15 insertions(+), 3 deletions(-)
(ignite-extensions) branch master updated (af7fdb09 -> d3692283)
This is an automated email from the ASF dual-hosted git repository. timoninmaxim pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git from af7fdb09 IGNITE-22072 Fixed compilation after custom metrics (#260) add 107b38b6 IGNITE-22080 Fix ConflictResolver fails on debug logging add 5cf71339 Add debug log for error add 88236cae Merge branch 'master' of github.com:apache/ignite-extensions into IGNITE-22080__debug_resolver new d3692283 IGNITE-22080 Fix ConflictResolver fails on debug logging (#261) The 1 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. Summary of changes: .../CacheVersionConflictResolverImpl.java| 2 +- .../DebugCacheVersionConflictResolverImpl.java | 16 ++-- 2 files changed, 15 insertions(+), 3 deletions(-)
(ignite-3) branch main updated (8bde02bffb -> ced1035ffa)
This is an automated email from the ASF dual-hosted git repository. jooger pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git from 8bde02bffb Bump org.apache.calcite.avatica:avatica-core from 1.24.0 to 1.25.0 (#3624) add ced1035ffa IGNITE-21923: Cover SQL E051-09(Basic query specification, Rename columns in the FROM clause) feature by tests (#3628) No new revisions were added by this update. Summary of changes: .../runner/app/ItIgniteNodeRestartTest.java| 2 +- .../ignite/internal/sql/engine/ItMetadataTest.java | 6 ++ .../sql/basic_queries/rename_columns_in_from.test | 79 ++ .../sql/engine/planner/JoinCommutePlannerTest.java | 1 - 4 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 modules/sql-engine/src/integrationTest/sql/basic_queries/rename_columns_in_from.test
(ignite-3) branch main updated (2ba5a6def1 -> 8bde02bffb)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git from 2ba5a6def1 Bump archunit from 1.2.1 to 1.3.0 (#3623) add 8bde02bffb Bump org.apache.calcite.avatica:avatica-core from 1.24.0 to 1.25.0 (#3624) No new revisions were added by this update. Summary of changes: gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(ignite-3) branch main updated: Bump archunit from 1.2.1 to 1.3.0 (#3623)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git The following commit(s) were added to refs/heads/main by this push: new 2ba5a6def1 Bump archunit from 1.2.1 to 1.3.0 (#3623) 2ba5a6def1 is described below commit 2ba5a6def13736ff00fff609c66a07acd65d2e1f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Fri Apr 19 15:02:51 2024 +0300 Bump archunit from 1.2.1 to 1.3.0 (#3623) Bumps `archunit` from 1.2.1 to 1.3.0. Updates `com.tngtech.archunit:archunit` from 1.2.1 to 1.3.0 - [Release notes](https://github.com/TNG/ArchUnit/releases) - [Commits](https://github.com/TNG/ArchUnit/compare/v1.2.1...v1.3.0) Updates `com.tngtech.archunit:archunit-junit5` from 1.2.1 to 1.3.0 - [Release notes](https://github.com/TNG/ArchUnit/releases) - [Commits](https://github.com/TNG/ArchUnit/compare/v1.2.1...v1.3.0) --- updated-dependencies: - dependency-name: com.tngtech.archunit:archunit dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.tngtech.archunit:archunit-junit5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: Pavel Tupitsyn Co-authored-by: Pavel Tupitsyn --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4990b70198..c66a9383d2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -72,7 +72,7 @@ fastutil = "8.5.13" kryo = "5.6.0" bytebuddy = "1.14.12" mockServer = "5.15.0" -archunit = "1.2.1" +archunit = "1.3.0" testkit = "1.10.2" openapi = "4.10.0" autoService = "1.1.1"
(ignite-3) branch dependabot/gradle/org.apache.calcite.avatica-avatica-core-1.25.0 deleted (was 6447b84063)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch dependabot/gradle/org.apache.calcite.avatica-avatica-core-1.25.0 in repository https://gitbox.apache.org/repos/asf/ignite-3.git was 6447b84063 Bump org.apache.calcite.avatica:avatica-core from 1.24.0 to 1.25.0 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(ignite-3) branch dependabot/gradle/archunit-1.3.0 deleted (was d41944d407)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch dependabot/gradle/archunit-1.3.0 in repository https://gitbox.apache.org/repos/asf/ignite-3.git was d41944d407 Bump archunit from 1.2.1 to 1.3.0 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(ignite-3) branch main updated (5a419c5dd9 -> b43e81f171)
This is an automated email from the ASF dual-hosted git repository. ppa pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git from 5a419c5dd9 IGNITE-21935: Cover SQL E153(Updatable queries with subqueries) feature by tests (#3630) add b43e81f171 IGNITE-21996 Sql. Improve test coverage for ALTER COLUMN command (#3631) No new revisions were added by this update. Summary of changes: .../sql/engine/ItAlterTableAlterColumnTest.java| 41 ++ 1 file changed, 34 insertions(+), 7 deletions(-)
(ignite-extensions) branch master updated: IGNITE-22072 Fixed compilation after custom metrics (#260)
This is an automated email from the ASF dual-hosted git repository. namelchev 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 af7fdb09 IGNITE-22072 Fixed compilation after custom metrics (#260) af7fdb09 is described below commit af7fdb098f1820327dc24c9873cc93287506505d Author: Vladimir Steshin AuthorDate: Fri Apr 19 13:09:48 2024 +0300 IGNITE-22072 Fixed compilation after custom metrics (#260) --- .../main/java/org/apache/ignite/cdc/AbstractIgniteCdcStreamer.java | 7 +-- .../main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java | 2 +- .../java/org/apache/ignite/cdc/kafka/IgniteToKafkaCdcStreamer.java | 7 +-- .../apache/ignite/cdc/thin/IgniteToIgniteClientCdcStreamer.java| 2 +- .../test/java/org/apache/ignite/cdc/AbstractReplicationTest.java | 2 +- .../apache/ignite/cdc/kafka/KafkaToIgniteMetadataUpdaterTest.java | 4 ++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/AbstractIgniteCdcStreamer.java b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/AbstractIgniteCdcStreamer.java index bbe184e1..149e03e4 100644 --- a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/AbstractIgniteCdcStreamer.java +++ b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/AbstractIgniteCdcStreamer.java @@ -27,11 +27,12 @@ import org.apache.ignite.binary.BinaryType; import org.apache.ignite.internal.binary.BinaryContext; import org.apache.ignite.internal.binary.BinaryMetadata; import org.apache.ignite.internal.binary.BinaryTypeImpl; -import org.apache.ignite.internal.processors.metric.MetricRegistry; +import org.apache.ignite.internal.processors.metric.MetricRegistryImpl; import org.apache.ignite.internal.processors.metric.impl.AtomicLongMetric; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.A; import org.apache.ignite.internal.util.typedef.internal.CU; +import org.apache.ignite.metric.MetricRegistry; import org.apache.ignite.resources.LoggerResource; import static org.apache.ignite.cdc.kafka.IgniteToKafkaCdcStreamer.DFLT_IS_ONLY_PRIMARY; @@ -98,7 +99,7 @@ public abstract class AbstractIgniteCdcStreamer implements CdcConsumer { protected IgniteLogger log; /** {@inheritDoc} */ -@Override public void start(MetricRegistry mreg) { +@Override public void start(MetricRegistry reg) { A.notEmpty(caches, "caches"); cachesIds = caches.stream() @@ -106,6 +107,8 @@ public abstract class AbstractIgniteCdcStreamer implements CdcConsumer { .boxed() .collect(Collectors.toSet()); +MetricRegistryImpl mreg = (MetricRegistryImpl)reg; + this.evtsCnt = mreg.longMetric(EVTS_CNT, EVTS_CNT_DESC); this.typesCnt = mreg.longMetric(TYPES_CNT, TYPES_CNT_DESC); this.mappingsCnt = mreg.longMetric(MAPPINGS_CNT, MAPPINGS_CNT_DESC); diff --git a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java index 146fc52d..618c61d7 100644 --- a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java +++ b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java @@ -26,11 +26,11 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.binary.BinaryContext; import org.apache.ignite.internal.cdc.CdcMain; import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; -import org.apache.ignite.internal.processors.metric.MetricRegistry; import org.apache.ignite.internal.util.typedef.internal.A; import org.apache.ignite.lang.IgniteExperimental; import org.apache.ignite.lifecycle.LifecycleBean; import org.apache.ignite.lifecycle.LifecycleEventType; +import org.apache.ignite.metric.MetricRegistry; import static org.apache.ignite.lifecycle.LifecycleEventType.AFTER_NODE_STOP; import static org.apache.ignite.lifecycle.LifecycleEventType.BEFORE_NODE_STOP; diff --git a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/IgniteToKafkaCdcStreamer.java b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/IgniteToKafkaCdcStreamer.java index 0dce9442..3ae5223b 100644 --- a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/IgniteToKafkaCdcStreamer.java +++ b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/IgniteToKafkaCdcStreamer.java @@ -39,7 +39,7 @@ import org.apache.ignite.cdc.TypeMapping; import org.apache.ignite.cdc.conflictresolve.CacheVersionConflictResolverImpl; import org.apache.ignite.internal.binary.BinaryTypeImpl; import org.apache.ignite.internal.cdc.CdcMain; -import org.apache.ignite.internal.processors.metric.MetricRegistry; +import
(ignite-3) branch main updated: IGNITE-21935: Cover SQL E153(Updatable queries with subqueries) feature by tests (#3630)
This is an automated email from the ASF dual-hosted git repository. jooger pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git The following commit(s) were added to refs/heads/main by this push: new 5a419c5dd9 IGNITE-21935: Cover SQL E153(Updatable queries with subqueries) feature by tests (#3630) 5a419c5dd9 is described below commit 5a419c5dd92fd15f278ac101c3699db1827092c3 Author: ygerzhedovich <41903880+ygerzhedov...@users.noreply.github.com> AuthorDate: Fri Apr 19 13:04:28 2024 +0300 IGNITE-21935: Cover SQL E153(Updatable queries with subqueries) feature by tests (#3630) --- .../sql/subquery/scalar/test_delete_subquery.test | 1 + .../sql/subquery/scalar/test_update_subquery.test | 17 + .../scalar/test_update_subquery.test_ignore| 73 -- 3 files changed, 18 insertions(+), 73 deletions(-) diff --git a/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_delete_subquery.test b/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_delete_subquery.test index 54a197296a..22c7437e5d 100644 --- a/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_delete_subquery.test +++ b/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_delete_subquery.test @@ -1,5 +1,6 @@ # name: test/sql/subquery/scalar/test_delete_subquery.test # description: Test subqueries in delete +# feature: E153 # group: [scalar] statement ok diff --git a/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_update_subquery.test b/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_update_subquery.test index 4cdf18f991..b36c1ff75b 100644 --- a/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_update_subquery.test +++ b/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_update_subquery.test @@ -1,5 +1,6 @@ # name: test/sql/subquery/scalar/test_update_subquery.test # description: Test subqueries in update +# feature: E153 # group: [scalar] statement ok @@ -59,3 +60,19 @@ SELECT id, i FROM integers ORDER BY id 3 2 4 3 +skipif ignite3 +# https://issues.apache.org/jira/browse/IGNITE-15616 +# use DEFAULT with correlated subquery in WHERE +statement ok +UPDATE integers i1 SET i=DEFAULT WHERE i=(SELECT MIN(i) FROM integers WHERE i1.idhttps://issues.apache.org/jira/browse/IGNITE-15616 +query II +SELECT id, i FROM integers ORDER BY id + +1 NULL +2 NULL +3 2 +4 3 + diff --git a/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_update_subquery.test_ignore b/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_update_subquery.test_ignore deleted file mode 100644 index 5b5597eae9..00 --- a/modules/sql-engine/src/integrationTest/sql/subquery/scalar/test_update_subquery.test_ignore +++ /dev/null @@ -1,73 +0,0 @@ -# name: test/sql/subquery/scalar/test_update_subquery.test -# description: Test subqueries in update -# group: [scalar] - -statement ok -PRAGMA enable_verification - -statement ok -CREATE TABLE integers(id INTEGER, i INTEGER) - -statement ok -INSERT INTO integers VALUES (1, 1), (2, 2), (3, 3), (4, NULL) - -# correlated subquery in update -statement ok -UPDATE integers i1 SET i=(SELECT MAX(i) FROM integers WHERE i1.i<>i) - -query II -SELECT id, i FROM integers ORDER BY id - -1 3 -2 3 -3 2 -4 NULL - -# uncorrelated subquery in update -statement ok -UPDATE integers i1 SET i=(SELECT MAX(i) FROM integers) WHERE i=(SELECT MIN(i) FROM integers) - -query II -SELECT id, i FROM integers ORDER BY id - -1 3 -2 3 -3 3 -4 NULL - -# use different correlated column in subquery -statement ok -UPDATE integers i1 SET i=(SELECT MAX(id) FROM integers WHERE id
(ignite) branch master updated: IGNITE-22026 Fix incorrect retry logic in GridCacheIoManager send method (#11311)
This is an automated email from the ASF dual-hosted git repository. timoninmaxim 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 1c34e2daca5 IGNITE-22026 Fix incorrect retry logic in GridCacheIoManager send method (#11311) 1c34e2daca5 is described below commit 1c34e2daca546f46a9a0c7eb05a7e9d45fa75d59 Author: Ilya Shishkov AuthorDate: Fri Apr 19 10:51:16 2024 +0300 IGNITE-22026 Fix incorrect retry logic in GridCacheIoManager send method (#11311) --- .../processors/cache/GridCacheIoManager.java | 18 +- .../cache/GridCacheIoManagerRetryTest.java | 208 + .../ignite/testsuites/IgniteCacheTestSuite13.java | 3 + 3 files changed, 218 insertions(+), 11 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java index b4f291977ff..201bd14f698 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java @@ -1204,12 +1204,13 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { int cnt = 0; -while (cnt <= retryCnt) { +while (true) { try { -cnt++; - cctx.gridIO().sendToGridTopic(node, TOPIC_CACHE, msg, plc); +if (log.isDebugEnabled()) +log.debug("Sent cache message [msg=" + msg + ", node=" + U.toShortString(node) + ']'); + return; } catch (ClusterTopologyCheckedException e) { @@ -1219,7 +1220,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { if (!cctx.discovery().alive(node.id()) || !cctx.discovery().pingNode(node.id())) throw new ClusterTopologyCheckedException("Node left grid while sending message to: " + node.id(), e); -if (cnt == retryCnt || cctx.kernalContext().isStopping()) +if (cnt++ >= retryCnt || cctx.kernalContext().isStopping()) throw e; else if (log.isDebugEnabled()) log.debug("Failed to send message to node (will retry): " + node.id()); @@ -1227,9 +1228,6 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { U.sleep(retryDelay); } - -if (log.isDebugEnabled()) -log.debug("Sent cache message [msg=" + msg + ", node=" + U.toShortString(node) + ']'); } /** @@ -1267,10 +1265,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { int cnt = 0; -while (cnt <= retryCnt) { +while (true) { try { -cnt++; - cctx.gridIO().sendOrderedMessage(node, topic, msg, plc, timeout, false); if (log.isDebugEnabled()) @@ -1286,7 +1282,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { if (cctx.discovery().node(node.id()) == null) throw new ClusterTopologyCheckedException("Node left grid while sending ordered message to: " + node.id(), e); -if (cnt == retryCnt) +if (cnt++ >= retryCnt) throw e; else if (log.isDebugEnabled()) log.debug("Failed to send message to node (will retry): " + node.id()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIoManagerRetryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIoManagerRetryTest.java new file mode 100644 index 000..0ab5cd53822 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIoManagerRetryTest.java @@ -0,0 +1,208 @@ +/* + * 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; +