This is an automated email from the ASF dual-hosted git repository.
vldpyatkov 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 41e3104af6a IGNITE-29224 Misleading affinity history error when ready
affinity version lags behind exchange future completion (#13767)
41e3104af6a is described below
commit 41e3104af6a126d40cdb386aed880b086416c831
Author: Vladislav Pyatkov <[email protected]>
AuthorDate: Thu Oct 29 15:09:47 2026 +0300
IGNITE-29224 Misleading affinity history error when ready affinity version
lags behind exchange future completion (#13767)
---
.../junits/common/GridCommonAbstractTest.java | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
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 b923e6bd1d0..2eb1c465dfa 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
@@ -668,18 +668,21 @@ public abstract class GridCommonAbstractTest extends
GridAbstractTest {
else
startTime = g0.context().discovery().gridStartTime();
- IgniteInternalFuture<?> exchFut =
-
g0.context().cache().context().exchange().affinityReadyFuture(waitTopVer);
+ GridCachePartitionExchangeManager<?, ?> nodeExchMgr =
g0.context().cache().context().exchange();
- if (exchFut != null && !exchFut.isDone()) {
- try {
- exchFut.get(timeout);
- }
- catch (IgniteCheckedException e) {
- log.error("Failed to wait for exchange [topVer=" +
waitTopVer +
- ", node=" + g0.name() + ']', e);
+ try {
+ AffinityTopologyVersion completedVer =
nodeExchMgr.affinityReadyFuture(waitTopVer).get(timeout);
+
+ // The exchange future completes before its listener publishes
the ready affinity version.
+ if (!waitForCondition(() ->
nodeExchMgr.readyAffinityVersion().compareTo(completedVer) >= 0, timeout)) {
+ throw new IgniteException("Timeout waiting for ready
affinity publication [node=" + g0.name() +
+ ", completedVer=" + completedVer + ", readyVer=" +
nodeExchMgr.readyAffinityVersion() + ']');
}
}
+ catch (IgniteCheckedException e) {
+ throw new IgniteException("Failed to wait for exchange
[topVer=" + waitTopVer +
+ ", node=" + g0.name() + ']', e);
+ }
for (IgniteCacheProxy<?, ?> c : g0.context().cache().jcaches()) {
CacheConfiguration cfg = c.context().config();