Skip to content

Add a callback on lock renewal failure #4698

Open

Description

@gpoulin

Currently, the RedissonClient will renew lock without lease time every lockWatchdogTimeout / 3. If the renewal process fail, the client simply log the issue. Currently, there's no way for applications to know that the renewal failed. Having some kind of callback in such event would allow for application to stop the work they are doing assuming they have lost the lock.

An alternative would be to expose renewExpirationAsync so application could create lock with lease and implement their own renewal mechanism.

Activity

  1. johndemic commented on Jul 16, 2025

    @johndemic

    A callback for lock lease expiration would also be super useful - particularly in the context of transactional rollback (ie, if a lock lease timeout is because of a recoverable scenario)

  2. guikaua12 commented on Jul 20, 2026

    @guikaua12

    I'd like to work on this.

    My proposal is to add a configurable LockRenewalFailureListener that is notified when a watchdog lock-renewal attempt fails. The callback would report the lock name, thread ID, and error, without claiming that the lock has definitely expired or been lost.

    Please let me know if you would prefer a different API or behavior

  3. added this to the 4.8.1 milestone on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions