Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Redis - Expired Indexes are not deleted

$
0
0

I found the following question (Spring Redis - Indexes not deleted after main entry expires) about a problem with expiration of indexes in Redis.

The problem is that the main and :phantom entries expire and are being deleted correctly, but the corresponding :idx entries survive orphaned in Redis.

One of the proposed solutions was to enable KeyspaceEvents, so that Redis automatically removes indexes of expired entries during the cleanup job.

Unfortunately this solution will not work for our Spring Boot application, as we are using Redis Enterprise as a provided service inside a cloud environment, which does not allow us to make any configuration changes (CONFIG command is disabled).

Here what I tried:

@Configuration
@EnableRedisRepositories(enableKeyspaceEvents = RedisKeyValueAdapter.EnableKeyspaceEvents.ON_STARTUP)
public class RedisConfiguration {...}

Edit:
I thought this was working for my local Redis docker image, but I was wrong! And on our provided Redis (Enterprise) service it can't even be setup with the following message:
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'CONFIG'...

Can anybody give me a hint on how to get the indexes deleted?

We currently do not have many :idx entries, but they must/should be deleted together with the :phantom entry, to avoid keeping any 'orphaned' entries.

Thanks in advance.


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>