[
https://issues.apache.org/jira/browse/IGNITE-26564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18031046#comment-18031046
]
Ignite TC Bot commented on IGNITE-26564:
----------------------------------------
{panel:title=Branch: [pull/12390/head] Base: [master] : No blockers
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/12390/head] Base: [master] : New Tests
(2)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Queries 4{color} [[tests
1|https://ci2.ignite.apache.org/viewLog.html?buildId=8655918]]
* {color:#013220}IgniteBinaryCacheQueryTestSuite4:
SqlAffinityHistoryForDynamicallyCreatedCachesTest.testConcurrentCacheCreateAndSqlQuery
- PASSED{color}
{color:#00008b}Queries 4 (lazy=true){color} [[tests
1|https://ci2.ignite.apache.org/viewLog.html?buildId=8655920]]
* {color:#013220}IgniteBinaryCacheQueryLazyTestSuite4:
SqlAffinityHistoryForDynamicallyCreatedCachesTest.testConcurrentCacheCreateAndSqlQuery
- PASSED{color}
{panel}
[TeamCity *--> Run :: All*
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=8630174&buildTypeId=IgniteTests24Java8_RunAll]
> "Getting affinity for too old topology version" error on SQL query
> ------------------------------------------------------------------
>
> Key: IGNITE-26564
> URL: https://issues.apache.org/jira/browse/IGNITE-26564
> Project: Ignite
> Issue Type: Task
> Reporter: Sergey Korotkov
> Assignee: Sergey Korotkov
> Priority: Minor
> Labels: ise
> Attachments: SqlAffinityHistoryForDynamicallyCreatedCachesTest.java
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The misleading error {{Getting affinity for too old topology version that is
> already out of history (try to increase 'IGNITE_AFFINITY_HISTORY_SIZE' system
> property)}} may occure on SQL query execution if query is started before the
> partitions exchange is completed for some just created cache mentioned in SQL
> statement.
> It may be so if cache is created and queried from different threads and/or
> applications.
> Looks like some more appropriate error should be returned saying that cache
> is not still ready to be queried or something like this.
> ***
> Reproducer is attached.
> Initial topology version for cache is [topVer=3, minorTopVer=2] but query is
> started the moment the cluster topology is still [topVer=3, minorTopVer=1].
>
> Full stack
> {noformat}
> [2025-10-02T11:49:09,069][WARN
> ][client-connector-#410%query.SqlAffinityHistoryForDynamicallyCreatedCachesTest0%][ClientListenerNioListener]
> Failed to process client request
> [req=o.a.i.i.processors.platform.client.cache.ClientCacheSqlFieldsQueryRequest@35523a14,
> msg=Getting affinity for too old topology version that is already out of
> history (try to increase 'IGNITE_AFFINITY_HISTORY_SIZE' system property)
> [locNode=TcpDiscoveryNode [id=7c83a86d-424f-4308-9a2a-3dd519800000,
> consistentId=127.0.0.1:47500, addrs=ArrayList [127.0.0.1], sockAddrs=HashSet
> [/127.0.0.1:47500], discPort=47500, order=1, intOrder=1, loc=true,
> ver=2.18.0#20251002-sha1:f81201c8, isClient=false], grp=SQL_TABLE,
> topVer=AffinityTopologyVersion [topVer=3, minorTopVer=1],
> lastAffChangeTopVer=AffinityTopologyVersion [topVer=3, minorTopVer=1],
> head=AffinityTopologyVersion [topVer=3, minorTopVer=2],
> history=[AffinityTopologyVersion [topVer=3, minorTopVer=2]],
> maxNonShallowHistorySize=25]]
> java.lang.IllegalStateException: Getting affinity for too old topology
> version that is already out of history (try to increase
> 'IGNITE_AFFINITY_HISTORY_SIZE' system property) [locNode=TcpDiscoveryNode
> [id=7c83a86d-424f-4308-9a2a-3dd519800000, consistentId=127.0.0.1:47500,
> addrs=ArrayList [127.0.0.1], sockAddrs=HashSet [/127.0.0.1:47500],
> discPort=47500, order=1, intOrder=1, loc=true,
> ver=2.18.0#20251002-sha1:f81201c8, isClient=false], grp=SQL_TABLE,
> topVer=AffinityTopologyVersion [topVer=3, minorTopVer=1],
> lastAffChangeTopVer=AffinityTopologyVersion [topVer=3, minorTopVer=1],
> head=AffinityTopologyVersion [topVer=3, minorTopVer=2],
> history=[AffinityTopologyVersion [topVer=3, minorTopVer=2]],
> maxNonShallowHistorySize=25]
> at
> org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:841)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.assignment(GridCacheAffinityManager.java:234)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.assignment(GridCacheAffinityManager.java:219)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.query.h2.twostep.ReducePartitionMapper.stableDataNodes(ReducePartitionMapper.java:210)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.h2.twostep.ReducePartitionMapper.nodesForPartitions(ReducePartitionMapper.java:121)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.createMapping(GridReduceQueryExecutor.java:868)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:400)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$5.iterator(IgniteH2Indexing.java:1436)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.iter(QueryCursorImpl.java:102)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.query.h2.RegisteredQueryCursor.iter(RegisteredQueryCursor.java:91)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:92)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.platform.client.cache.ClientCacheQueryCursor.iterator(ClientCacheQueryCursor.java:136)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.platform.client.cache.ClientCacheQueryCursor.writePage(ClientCacheQueryCursor.java:71)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.platform.client.cache.ClientCacheSqlFieldsQueryResponse.encode(ClientCacheSqlFieldsQueryResponse.java:73)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.platform.client.ClientMessageParser.encode(ClientMessageParser.java:749)
> ~[ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.handleResponse(ClientListenerNioListener.java:272)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:249)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:58)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
> [ignite-core-2.18.0-SNAPSHOT.jar:2.18.0-SNAPSHOT]
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> [?:?]
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> [?:?]
> at java.base/java.lang.Thread.run(Thread.java:829) [?:?]
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)