From 71d30076495cfdaa07b4a572a4fee4743510e19e Mon Sep 17 00:00:00 2001 From: Moshe Good Date: Mon, 19 Feb 2024 11:50:56 -0500 Subject: [PATCH] Update README.md to describe when a LockCurrentlyUnavailableException is thrown We not only throw LockCurrentlyUnavailableException when the lock is not yet expired, we also throw LockCurrentlyUnavailableException when we simply don't know if the lock is expired. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3777351..500b4d6 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,8 @@ currently unavailable. If the lock does not exist or if the lock has been acquired by the other machine and is stale (has passed the lease duration), this would successfully acquire the lock. -If the lock has already been held by another worker and has not been released yet and the lease duration has not expired +If the lock has already been held by another worker and has not been released yet +and this worker does not know for certain that the lease duration has expired since the lock was last updated by the current owner, this will throw a LockCurrentlyUnavailableException exception. The caller can chose to immediately retry the lock acquisition or to delay the processing for that lock item by NACKing the message.