Fixed - Expired LiveObjects with RIndex annotations retain indexed data. #2625

pull/5068/head
Nikita Koksharov 2 years ago
parent b985c45115
commit 1ab979a6b9

@ -65,7 +65,7 @@ public class RedissonLiveObjectService implements RLiveObjectService {
private final ConcurrentMap<Class<?>, Class<?>> classCache;
private final CommandAsyncExecutor commandExecutor;
private final LiveObjectSearch seachEngine;
private final AtomicBoolean listenerLatch = new AtomicBoolean();
private static final AtomicBoolean LISTENER_LATCH = new AtomicBoolean();
public RedissonLiveObjectService(ConcurrentMap<Class<?>, Class<?>> classCache,
CommandAsyncExecutor commandExecutor) {
@ -73,7 +73,7 @@ public class RedissonLiveObjectService implements RLiveObjectService {
this.commandExecutor = commandExecutor;
this.seachEngine = new LiveObjectSearch(commandExecutor);
if (listenerLatch.compareAndSet(false, true)) {
if (LISTENER_LATCH.compareAndSet(false, true)) {
RPatternTopic topic = new RedissonPatternTopic(StringCodec.INSTANCE, commandExecutor, "__keyevent@*:expired");
topic.addListenerAsync(String.class, (pattern, channel, msg) -> {
if (msg.contains("redisson_live_object:")) {

Loading…
Cancel
Save