DefaultCacheAccessTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improve file lock contention handling

This commit improves the likelihood for lock requesters to acquire a

file lock after it is released due to contention. After the lock has

been released, the former lock holder now sends a packet to the sockets

of all requesters. While old clients will simply ignore the additional

packet, new clients will interpret it as a signal that the file lock has

been released and will try to acquire it immediately.

Issue: gradle/gradle-private#1412.

  1. … 14 more files in changeset.
Provide an empty contended action instead of null

This contention handling is already active for exclusive locks, but

without an action it is ignoring requests from other parties.

With this, it sends confirmation that the request was received

and that lock releasing is in progress. Although the release itself

is not performed by the contended action, but manually after the

lock is no longer needed (which is the contract for exclusive locks).

  1. … 2 more files in changeset.
Start whenContented action before waiting for the lock

The action is now also responsible for receiving confirmation that the

lock is in the process of being released.

  1. … 5 more files in changeset.
Move org.gradle.cache.internal to persistent-cache project

+review REVIEW-6562

    • -0
    • +729
    ./DefaultCacheAccessTest.groovy
  1. … 184 more files in changeset.