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
{{ message }}
Repository navigation
RLocalCachedMap with RTransaction locks the Object #4605
As suggested by @mrniko in #4587 I am trying to use RTransactions to insert records in bulk in Redis. But the transaction seems to be locking the keys forever. Is this the right way to do it? I am not able to find the details around LocalCachedMapDisabledKey and need help in inserting millions of records in Redis with LocalCachedMap benefits. Getting this error when app starts: Failed to instantiate [com.apollopharmacy.inventorymanagementservice.repository.cache.InventoryCacheRepository]: Constructor threw exception; nested exception is java.lang.ClassCastException: class java.lang.String cannot be cast to class org.redisson.cache.LocalCachedMapDisabledKey (java.lang.String is in module java.base of loader 'bootstrap'; org.redisson.cache.LocalCachedMapDisabledKey is in unnamed module of loader 'app')
@mrniko can we do the same with RlOcalCachedMap.putAll() ? will it load in bulk and also notify the other instances? Curious to know the difference between RBatch and putAll
I'm experiencing a similar issue.
We have a requirement where we need to entirely reload 2 different RLocalCachedMap when we consume an event.
pseudocode:
val transaction = redissonClient.createTransaction(TransactionOptions.defaults())
transaction.getLocalCachedMap(map1).clear()
transaction.getLocalCachedMap(map1).putAll(valuesForMap1)
transaction.getLocalCachedMap(map2).clear()
transaction.getLocalCachedMap(map2).putAll(valuesForMap2)
Upon commit, I'm then seeing logs like:
Caused by: java.lang.ClassCastException: class org.redisson.transaction.operation.DeleteOperation cannot be cast to class org.redisson.transaction.operation.map.MapOperation (org.redisson.transaction.operation.DeleteOperation and org.redisson.transaction.operation.map.MapOperation are in unnamed module of loader 'app')
Activity
shivangmittal01 commentedon Oct 18, 2022
@mrniko can we do the same with RlOcalCachedMap.putAll() ? will it load in bulk and also notify the other instances? Curious to know the difference between RBatch and putAll
ofir-popowski commentedon Jan 9, 2023
I'm experiencing a similar issue.
We have a requirement where we need to entirely reload 2 different
RLocalCachedMapwhen we consume an event.pseudocode:
Upon commit, I'm then seeing logs like:
Removing the transaction part results in 0 errors