Skip to content

Refactor the lock implementation in GlobalClockTransactionHook #35041

@FlyingZC

Description

@FlyingZC

Feature Request

Refactor the lock implementation in GlobalClockTransactionHook.

  1. Avoid using registry-based locks (e.g., ZooKeeper) because acquiring a lock might timeout in beforeCommit, but the afterCommit could still attempt to release it. Eliminate unnecessary unlock operations.

Corresponding FIXME:

FIXME: If timeout occurs when a lock is required but TSO is not assigned, the commit will still proceed. The solution is to replace the registry center's lock with a Redis-based lock implementation.
  1. Move the locking logic to the TSO component (e.g., implement locking/unlocking via Redis's native lock in RedisTSOProvider). Corresponding TODO:
// TODO: Use Redis lock instead of registry center's lock.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions