问题描述
使用redissonClient.getBucket(key).expire(expire, timeUnit);设置redis的某个key值的过期时间。
发生报错如下:
[Error Event] Listen to the [HapiErrorEvent] exception: ERR bad lua script for redis cluster, redis.call/pcall, wrong number of arguments for ‘pexpire’ command
问题产生原因
aliyun 对 lua脚本的额外检测
解决方法:
通过 script_check_enable参数关闭检测项。
官方文档
https://help.aliyun.com/zh/tair/support/usage-of-lua-scripts?spm=a2c4g.11186623.0.i10