Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Lock lease service should short circuit on unlock #5072

Merged
merged 3 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-5072.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: improvement
improvement:
description: Lock lease service should short circuit on unlock
links:
- https://github.com/palantir/atlasdb/pull/5072
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ Set<LockToken> refreshLockLeases(Set<LockToken> uncastedTokens) {
}

Set<LockToken> unlock(Set<LockToken> tokens) {
if (tokens.isEmpty()) {
return tokens;
}
Set<LeasedLockToken> leasedLockTokens = leasedTokens(tokens);
leasedLockTokens.forEach(LeasedLockToken::invalidate);

Expand Down