Amelchev Nikita created IGNITE-13741:
----------------------------------------
Summary: NPE on client reconnect with static caches configured
Key: IGNITE-13741
URL: https://issues.apache.org/jira/browse/IGNITE-13741
Project: Ignite
Issue Type: Bug
Affects Versions: 2.8.1
Reporter: Amelchev Nikita
There was NPE during the client node reconnect to the cluster.
1. Configure static replicated persisted cache.
2. Start 2 server nodes and 1 client node. Activate the cluster and fill the
cache with any values.
3. Restart all servers.
4. When client reconnected it throws the exception from
{{CacheAffinitySharedManager#processClientCachesRequests}}:
{noformat}
// Get ready exchange version.
AffinityTopologyVersion topVer = cctx.exchange().readyAffinityVersion();
DiscoCache discoCache = cctx.discovery().discoCache(topVer);
// discoCache was null
ClusterNode node = discoCache.oldestAliveServerNode();
{noformat}
{noformat}
2020-11-17 17:22:59.471 [INFO
][exchange-worker-#65][org.apache.ignite.internal.processors.cache.GridCacheProcessor]
Stopped cache [cacheName=test-persist-partitioned-atomic-cache]
2020-11-17 17:22:59.472 [WARN
][tcp-client-disco-msg-worker-#4][org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi]
Client node was reconnected after it was already considered failed by the
server topology (this could happen after all servers restarted or due to a long
network outage between the client and servers). All continuous queries and
remote event listeners created by this client will be unsubscribed, consider
listening to EVT_CLIENT_NODE_RECONNECTED event to restore them.
2020-11-17 17:22:59.473 [INFO
][sys-#56][org.apache.ignite.internal.processors.cluster.ClusterProcessor]
Writing cluster ID and tag to metastorage on ready for write ClusterIdAndTag
[id=b4d4e0b1-23ca-4399-bf0d-5238bb42eccb, tag=admiring_herschel]
2020-11-17 17:22:59.473 [INFO
][disco-event-worker-#52][org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
Client node reconnected to topology: TcpDiscoveryNode
[id=9864d053-9100-4ab1-892b-540f19b30c32, consistentId=Example_3,
addrs=ArrayList [*], sockAddrs=HashSet [*], discPort=0, order=2, intOrder=0,
lastExchangeTime=1605622970162, loc=true, ver=2.8.1, isClient=true]
2020-11-17 17:22:59.474 [INFO
][disco-event-worker-#52][org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
Topology snapshot [ver=2, locNode=9864d053, servers=1, clients=1,
state=ACTIVE, CPUs=8, offheap=4.0GB, heap=6.9GB]
2020-11-17 17:22:59.474 [INFO
][disco-event-worker-#52][org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
^-- Baseline [id=0, size=2, online=1, offline=1]
2020-11-17 17:22:59.476 [INFO
][disco-notifier-worker-#50][org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor]
Received state change finish message: true
2020-11-17 17:22:59.477
[ERROR][exchange-worker-#65][org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager]
Failed to process custom exchange task: ClientCacheChangeDummyDiscoveryMessage
[reqId=9eb245bd-5cdc-4d13-8eac-9e7c7585c83f, cachesToClose=null, startCaches=
[test-persist-partitioned-atomic-cache]]
java.lang.NullPointerException: null
at
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCachesRequests(CacheAffinitySharedManager.java:666)
~[ignite-core-2.8.1.jar:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.processCustomExchangeTask(GridCacheProcessor.java:408)
~[ignite-core-2.8.1.jar:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.processCustomTask(GridCachePartitionExchangeManager.java:2997)
[ignite-core-2.8.1.jar:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:3145)
[ignite-core-2.8.1.jar:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:3063)
[ignite-core-2.8.1.jar:2.8.1]
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
[ignite-core-2.8.1.jar:2.8.1]
at java.lang.Thread.run(Thread.java:748)
2020-11-17 17:22:59.479 [INFO
][exchange-worker-#65][org.apache.ignite.internal.exchange.time] Started
exchange init [topVer=AffinityTopologyVersion [topVer=2, minorTopVer=0],
crd=false, evt=NODE_JOINED, evtNode=9864d053-9100-4ab1-892b-540f19b30c32,
customEvt=null, allowMerge=true, exchangeFreeSwitch=false]
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)