You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the docs when devs are using @RedisHash based solutions and when those types are having @Indexed fields, those set records are not going to be expired even the hash expires.
To overcome this issue the docs says a keyspace event listener must be enabled/registered. I tried this way on a GCP MemoryStore instance but it does fail with the following:
Because of the ON_DEMAND setting the exception comes on the very first "insert" into Redis, it does fail but after that I don't see more of these, but as we know it does not register the required listener.
The problem is that GCP MemoryStore instances do not permit the CONFIG parameter usage, even for reading it, I did disable overriding it, but that is a second step and the registration fails in the first one.
What can I do?
Right now I have to disable it and wait for a potential fix in the lib.
What can be the fix?
I'm not fully sure, but I may make the listener registration fault tolerant, by catching the exception when reading the config parameter. Here is the original implementation:
It override the notify-keyspace-events config parameter if it is set, so in my opinion we can catch an exception here.
The question if the event listener will work if we cannot set the config parameter to Ex as the default implementation would do that.
Based on this list its value by default is empty, but it should be configurable from outside.
The text was updated successfully, but these errors were encountered:
Based on the docs when devs are using
@RedisHash
based solutions and when those types are having@Indexed
fields, those set records are not going to be expired even the hash expires.To overcome this issue the docs says a keyspace event listener must be enabled/registered. I tried this way on a GCP MemoryStore instance but it does fail with the following:
Spring Data Redis version: 3.4.5
The app is annotated with the following settings:
Because of the ON_DEMAND setting the exception comes on the very first "insert" into Redis, it does fail but after that I don't see more of these, but as we know it does not register the required listener.
The problem is that GCP MemoryStore instances do not permit the CONFIG parameter usage, even for reading it, I did disable overriding it, but that is a second step and the registration fails in the first one.
What can I do?
What can be the fix?
I'm not fully sure, but I may make the listener registration fault tolerant, by catching the exception when reading the config parameter. Here is the original implementation:
org.springframework.data.redis.listener.KeyspaceEventMessageListener#init
It override the
notify-keyspace-events
config parameter if it is set, so in my opinion we can catch an exception here.The question if the event listener will work if we cannot set the config parameter to
Ex
as the default implementation would do that.Based on this list its value by default is empty, but it should be configurable from outside.
The text was updated successfully, but these errors were encountered: