Using bootstrap to keep information loaded across 2 Server Nodes. When doing a rolling restart a Node always stays up. When I boot the 1st Node up from a deployment, sometimes, not always, the cache is not loaded back into the 1st Node from Node 2nd where the data is replicated
启动日志如下:
JGroupsCacheReceiver|DEBUG||received bootstrap complete: cache=tokenCache JGroupsBootstrapManager|INFO ||Bootstrap for cache tokenCache is complete, loaded 0 elements JGroupsCacheReceiver|DEBUG||received bootstrap reply: cache=tokenCache, key=92b00b82-10f7-41d5-81bf-77cda762d421 JGroupsBootstrapManager|WARN ||No BootstrapRequest registered for cache tokenCache, the event will have no effect: JGroupEventMessage [event=BOOTSTRAP_RESPONSE, cacheName=tokenCache, serializableKey=92b00b82-10f7-41d5-81bf-77cda762d421, element=[ key = 92b00b82-10f7-41d5-81bf-77cda762d421, value=user1234, version=1, hitCount=0, CreationTime = 1444165390000, LastAccessTime = 1444165390000 ]] JGroupsBootstrapManager|DEBUG||Removed BootstrapRequest [cache=tokenCache, bootstrapStatus=COMPLETE, boostrapCompleteLatch=0, replicated=0, asynchronous=true, chunkSize=5000000]
导致节点初始化,缓存失败。
调试的过程中发现:发送端发送缓存响应先于缓存初始化完成,但是启动节点接受消息的时候,却是先接受到缓存初始化完成,然后才收到缓存响应。
ehcache官方也认为是bug:jiar链接如下:
https://jira.terracotta.org/jira/browse/EHC-1113
因此提醒使用者注意!