Comments (4)
@mrniko ,
It seems like the issue is at
When the Redisson is initialized in multiple JVMs, few of the pods fail to detect whether Sharding is supported and end up subscribing to RedissonTopic instead of RedissonShardedTopic.
I Implmented the RedissonClient interface and copied the required code from Redisson class and I forcefully set the sharding support as true in the SubscribeService and After that it's working as expected.
from redisson.
Unable to reproduce. Below is the code example:
for (int i = 0; i < 10; i++) {
int j = i;
RedissonClient rr = Redisson.create(r.getConfig());
RMapCache<String, String> tt2 = rr.getMapCache("test");
tt2.addListener(new EntryExpiredListener<String, String>() {
@Override
public void onExpired(EntryEvent<String, String> event) {
System.out.println("expired" + j + " " + event);
}
});
}
RMapCache<String, String> tt = r.getMapCache("test");
tt.addListener(new EntryExpiredListener<String, String>() {
@Override
public void onExpired(EntryEvent<String, String> event) {
System.out.println("expired " + event);
}
});
tt.put("1", "2", 1, TimeUnit.SECONDS);
Thread.sleep(10000);
log output:
expired3 org.redisson.api.map.event.EntryEvent@5c4f5ebb
expired4 org.redisson.api.map.event.EntryEvent@7fc2d768
expired7 org.redisson.api.map.event.EntryEvent@57a189ce
expired8 org.redisson.api.map.event.EntryEvent@647f1cab
expired org.redisson.api.map.event.EntryEvent@43753d30
expired5 org.redisson.api.map.event.EntryEvent@307fe2b2
expired6 org.redisson.api.map.event.EntryEvent@5cff5f93
expired9 org.redisson.api.map.event.EntryEvent@de62147
expired1 org.redisson.api.map.event.EntryEvent@5c4f783a
expired2 org.redisson.api.map.event.EntryEvent@1777296f
expired0 org.redisson.api.map.event.EntryEvent@7940476c
from redisson.
@mrniko
I noticed one more thing, With 4 pods I get the following results on redis-cli
PUBSUB SHARDNUMSUB redisson_map_cache_expired:{cacheName} results in 1
PUBSUB NUMSUB redisson_map_cache_expired:{cacheName} results in 3
from redisson.
Thanks for providing more details. Slave nodes reply with MOVED error. Fixed now.
from redisson.
Related Issues (20)
- Redisson is throwing exception after upgrading it to latest version(3.26.0) HOT 4
- Multiple locking of RLock reset remainTimeToLive to config default HOT 2
- PING Command execution timeout for command HOT 12
- JsonCodecWrapper defeats CODECS LRUCacheMap cache HOT 3
- ConcurrentModificationException in LRUCacheMap HOT 3
- Frequently cluster state updates in AWS Serverless HOT 1
- NPE after using org.redisson.api.options.LocalCachedMapOptions for RLocalCachedMap HOT 1
- Time to live for cache HOT 1
- Failed to parse yaml configuration throws NoSuchMethodError com.fasterxml.jackson.annotation.JsonTypeInfo.requireTypeIdForSubtypes() HOT 1
- Method Redisson#create keeps running Netty thread even if it fails to create a client instance HOT 2
- Question - I have a question about the way you implemented locks HOT 2
- Will already authenticated connections continue to work after refreshing credentials via credentialsResolver dynamically? HOT 1
- WriteRedisConnectionException: Unable to write command into connection! HOT 3
- RedissonClient.shutdown() always take 15 seconds to end HOT 2
- Can Redisson be used for Tomcat session cache? Getting java.lang.ClassNotFoundException on broadcasting session updates HOT 12
- Spring data: ERR wrong number of arguments for 'pexpire' command HOT 1
- Redisson throws NPE after upgrading to version 3.25.0 and higher HOT 1
- When using RMapCache to save data, \x00 appears HOT 4
- RedisConnectionException: SlaveConnectionPool no available Redis entries HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redisson.