Skip to content

Distributed lock#952

Merged
junkaixue merged 19 commits intoapache:distributed-lockfrom
mgao0:distributed-lock
Apr 14, 2020
Merged

Distributed lock#952
junkaixue merged 19 commits intoapache:distributed-lockfrom
mgao0:distributed-lock

Conversation

@mgao0
Copy link
Contributor

@mgao0 mgao0 commented Apr 14, 2020

  • Issues

My PR addresses the following Helix issues and references them in the PR description:
#672

  • Description
  1. Non blocking lock. We will reserve the capability to extend to a blocking lock in the future, meaning that we could provide the boolean parameter in API for either nonblocking or blocking.
  2. Timeout support. The client need to input the timeout when it tries to acquire the lock. After timeout, if no other client tries to get the lock, the client can still keep the lock, if other client tries to acquire the lock, and finds the previous client already timeout, the previous client will be forced to release the lock.
  3. Lock message support. The client can input the reason for the lock (a string) when it tries to acquire the lock, and future lock operation, when fails, will get the message for the current lock.
  4. Java API support.
  5. No notification support. When a client loses its lock after timeout or during SRE maintenance work, there is no notification sent out to it.
  • Tests

The following tests are written for this issue:
TestZKHelixNonblockingLock

  • Commits

My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"
Documentation (Optional)
In case of new functionality, my PR adds documentation in the following wiki page:
(Link the GitHub wiki you added)

  • Code Quality

My diff has been formatted using helix-style.xml
(helix-style-intellij.xml if IntelliJ IDE is used)

@junkaixue junkaixue merged commit c11ac95 into apache:distributed-lock Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants