Skip to content
New issue

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

分布式锁注解@JLock无法自动续期 #7836

Open
xiaoc-java opened this issue Feb 20, 2025 · 0 comments
Open

分布式锁注解@JLock无法自动续期 #7836

xiaoc-java opened this issue Feb 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@xiaoc-java
Copy link

版本号:

所有版本

问题描述:

项目:jeecg-boot-starter-lock
注解类:org.jeecg.boot.starter.lock.annotation.JLock
@jlock注解的超时时间expireSeconds默认值设置为30000L,这将导致redisson看门狗机制失效,大家用redisson默认是认为有看门狗机制自动续期的,这将有可能导致不符合应用逻辑的分布式锁失效问题出现,比用分布式锁控制的JOB执行时间较长导致锁无法续期而可能被重复执行。应将
expireSeconds的默认值设置为-1,在使用时,redisson框架锁的默认有效时间仍然是30秒,不会影响正常业务

错误截图:
Image Image

友情提示:

  • 未按格式要求发帖、描述过于简单的,会被直接删掉;
  • 描述问题请图文并茂,方便我们理解并快速定位问题;
  • 如果使用的不是master,请说明你使用的分支;
@xiaoc-java xiaoc-java added the bug Something isn't working label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant