RateLimiter Bug on 3.13.3 : bad argument #2 to 'unpack' (data string too short)
See original GitHub issueMy Code
private RRateLimiter rt;
@PostConstruct
public void init(){
rt = redissonClient.getRateLimiter("rt2");
rt.trySetRate(RateType.OVERALL, 100, 5, RateIntervalUnit.SECONDS);
}
@GetMapping("")
public void test(){
System.out.println(rt.availablePermits());
rt.acquire(1);
System.out.println(rt.availablePermits());
}
Expected behavior
Actual behavior
first call test() function, works fine, but after 5 SECONDS(after one period), will throw exception
org.redisson.client.RedisException: ERR Error running script (call to f_a953e1748e38137c3168a683556aa561bd05b340): @user_script:1: user_script:1: bad argument #2 to 'unpack' (data string too short) . channel: [id: 0x36f2cda8, L:/10.2.47.198:60323 - R:fenbi-notify-push-redis-dev.redis.rds.aliyuncs.com/10.13.160.82:6379] command: (EVAL), params: [local rate = redis.call('hget', KEYS[1], 'rate');local interval = redis.call('hget', KEYS[1], 'inter..., 5, rt2, {rt2}:value, {rt2}:value:f45a9de8-95b9-47f1-aef2-759c37d9f60a, {rt2}:permits, {rt2}:permits:f45a9de8-95b9-47f1-aef2-759c37d9f60a, 1599018405084]
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:365) ~[redisson-3.13.3.jar:3.13.3]
at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:196) ~[redisson-3.13.3.jar:3.13.3]
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:134) ~[redisson-3.13.3.jar:3.13.3]
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:104) ~[redisson-3.13.3.jar:3.13.3]
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:501) ~[netty-codec-4.1.51.Final.jar:4.1.51.Final]
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366) ~[netty-codec-4.1.51.Final.jar:4.1.51.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) ~[netty-codec-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.51.Final.jar:4.1.51.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.51.Final.jar:4.1.51.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.51.Final.jar:4.1.51.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.51.Final.jar:4.1.51.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
Steps to reproduce or test case
Redis version
Redisson version
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-data-18</artifactId>
<version>3.13.3</version>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>3.13.3</version>
</dependency>
Only 3.13.3 have this problem There is no problem on 3.13.2
Redisson configuration
config.setCodec(JsonJacksonCodec.INSTANCE);
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Package List — Spack 0.20.0.dev0 documentation
This is a list of things you can install using Spack. It is automatically generated based on the packages in this Spack version....
Read more >crash bug fix and enhancement update
Fixed bad URL, Source0, and bogus date in spec. Resolves: #1330328 This update is available via the Unbreakable Linux Network (ULN) and the...
Read more >[fedora-arm] arm rawhide report: 20140712 changes
Xml) = 0:2.0.0.0 RepetierHost-0.90D-2.fc21.noarch requires mono(System. ... banner-1.3.3-3.fc21 Prints a short string to the console in very ...
Read more >HISTORY.md · master · RocketChat / Rocket.Chat - OW2 Gitlab
Also solved a little undefined bug happening in the app ... convertToTeam endpoint not working when the channelName is sent as parameter.
Read more >Configuration Reference Red Hat OpenStack Platform 9
This document is for system administrators who want to look up configuration options. It contains lists of configuration options available with OpenStack ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed! Thanks for report
@adaboinanagarro
Can you share sample code to reproduce?