Skip to content

Commit

Permalink
Properly update node allocator state on release
Browse files Browse the repository at this point in the history
Statement ordering was incorrect previously and routine to process
pending acquires was woken up before whole state related to released
node was updated. It could still be observed by routine that released node is
occupied and pending acquire was not fulfilled.
  • Loading branch information
losipiuk committed May 18, 2022
1 parent 320250e commit dda4d2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ public void release()
node.cancel(true);
if (node.isDone() && !node.isCancelled()) {
deallocateMemory(getFutureValue(node));
wakeupProcessPendingAcquires();
checkState(fulfilledAcquires.remove(this), "node lease %s not found in fulfilledAcquires %s", this, fulfilledAcquires);
wakeupProcessPendingAcquires();
}
}
else {
Expand Down

0 comments on commit dda4d2c

Please sign in to comment.