我启动了一个 3 节点 Ignite 集群,但没有启用持久性。运行一段时间后,发现一个节点的缓存数据永远不会过期,而另外两个节点可以正常过期。
我使用以下方法连接并插入数据:
public class InsertData05 {
public static void main(String[] args) throws Exception {
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setAddresses("127.0.0.1:10800");
IgniteClient client = Ignition.startClient(clientConfiguration);
ClientCacheConfiguration configuration = new ClientCacheConfiguration();
configuration.setName("test");
configuration.setCacheMode(CacheMode.REPLICATED);
ClientCache<Object, Object> cache = client.getOrCreateCache(configuration);
Duration duration = new Duration(TimeUnit.SECONDS, 60);
ExpiryPolicy expiryPolicy = ModifiedExpiryPolicy.factoryOf(duration).create();
for (int i = 0; i < 1; i++) {
cache.withExpiryPolicy(expiryPolicy).put("bb" + i,"bb");
}
client.close();
}
}
打开Ignite服务器节点的DEBUG日志后,发现有问题的节点不再出现在堆外缓存上扫描过期数据并将其放入队列中的情况。在它的日志中,只有类似以下的信息:
[2023-08-31 17:51:01.355][DEBUG][GridTimeoutProcessor] Timeout has occurred [obj=org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager$1$1@qso42s7c, process=true]
[2023-08-31 17:51:01.355][DEBUG][GridClosureProcessor] Grid runnable started: closure-proc-worker
[2023-08-31 17:51:01.355][DEBUG][PartitionsEvictManager] After filling the evict queue [res=0, tombstone=true, size=0]
[2023-08-31 17:51:01.355][DEBUG][GridClosureProcessor] Grid runnable finished normally: closure-proc-worker
正常的节点日志中,会有以下日志:
[2023-08-31 17:51:00.265][DEBUG][GridTimeoutProcessor] Timeout has occurred [obj=org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager$1$1@670cf995, process=true]
[2023-08-31 17:51:00.265][DEBUG][GridTimeoutProcessor] Timeout has occurred [obj=org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager$1$1@7f8e158b, process=true]
[2023-08-31 17:51:00.265][DEBUG][GridClosureProcessor] Grid runnable started: closure-proc-worker
[2023-08-31 17:51:00.265][DEBUG][GridClosureProcessor] Grid runnable started: closure-proc-worker
[2023-08-31 17:51:00.265][DEBUG][PartitionsEvictManager] After filling the evict queue [res=0, tombstone=false, size=0]
[2023-08-31 17:51:00.266][DEBUG][PartitionsEvictManager] After filling the evict queue [res=0, tombstone=true, size=0]
[2023-08-31 17:51:00.266][DEBUG][GridClosureProcessor] Grid runnable finished normally: closure-proc-worker
[2023-08-31 17:51:00.266][DEBUG][GridClosureProcessor] Grid runnable finished normally: closure-proc-worker
版本:
我正在使用 Gridgain 社区版版本 8.8.9
非墓碑数据未被扫描到的可能原因有哪些?我找到了GG-34133,这里似乎已经优化了,但我无法查看其详细信息。两者之间有相关性吗?
这看起来确实像一个错误。由于您使用的是相当旧的版本(此时已有近两年的历史),我建议升级。您引用的票证(在 8.8.11 中修复)可能相关,但我不能完全确定。