We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expected behavior
After committing the transaction, the value for the key should be updated in the original RLocalCachedMap instance.
Actual behavior
The value for the key in the original RLocalCachedMap instance remains unchanged after committing the transaction.
Steps to reproduce or test case
RedissonClient redissonClient = createRedissonClient(); RLocalCachedMap<Object, Object> localCachedMap = redissonClient.getLocalCachedMap(LocalCachedMapOptions.name("Test") .codec(StringCodec.INSTANCE).cacheSize(2000) .evictionPolicy(LocalCachedMapOptions.EvictionPolicy.LRU) .timeToLive(Duration.ofHours(1)) .syncStrategy(LocalCachedMapOptions.SyncStrategy.UPDATE)); localCachedMap.put("1", "1"); RTransaction transaction = redissonClient.createTransaction( TransactionOptions.defaults()); RLocalCachedMap<Object, Object> transactionLocalCachedMap = transaction.getLocalCachedMap( localCachedMap); transactionLocalCachedMap.put("1", "2"); transaction.commit(); System.out.println(localCachedMap.get("1")); //prints 1
Redis version 7.2.4 Redisson version 3.29.0 Redisson configuration
config.setThreads(Integer.parseInt("100")) .setNettyThreads(Integer.parseInt("100")) .setUseThreadClassLoader(false).setUseScriptCache(true) .useClusterServers().addNodeAddress(redisClusterUrls.split(",")) .setReadMode(ReadMode.MASTER_SLAVE) .setTimeout(Integer.parseInt("5") * 60 * 1000) .setConnectTimeout(Integer.parseInt("5") * 60 * 1000) .setRetryInterval(5000).setRetryAttempts(6) .setSubscriptionsPerConnection(Integer.parseInt("100")) .setSubscriptionConnectionPoolSize(Integer.parseInt("1000")) .setMasterConnectionPoolSize(Integer.parseInt("1000")) .setSlaveConnectionPoolSize(Integer.parseInt("1000"));
The text was updated successfully, but these errors were encountered:
Let me know if this is expected behavior or not, right now i am clearing localcache after every transaction commit, this method works as of now.
public void removeTransaction() { transactionThreadLocal.remove(); if (null != redisCacheNamesThreadLocal.get()) { for (String cacheName : redisCacheNamesThreadLocal.get()) { RLocalCachedMap<Object, Object> cacheMap = getLocalCacheMap( cacheName); cacheMap.clearLocalCache(); LOCAL_CACHE_MAP.remove(cacheName); } redisCacheNamesThreadLocal.remove(); } }
Sorry, something went wrong.
No branches or pull requests
Expected behavior
After committing the transaction, the value for the key should be updated in the original RLocalCachedMap instance.
Actual behavior
The value for the key in the original RLocalCachedMap instance remains unchanged after committing the transaction.
Steps to reproduce or test case
Redis version
7.2.4
Redisson version
3.29.0
Redisson configuration
The text was updated successfully, but these errors were encountered: