See PHI2177. An install reports that WorkingCopy resources are being reclaimed by Drydock immediately after all leases release.
The expected behavior is that resources have a 3-minute immunity window after releases release during which they can not be reclaimed (in DrydockWorker->canReclaimResource()).
Likely, nothing is actually updating dateModified. A probable fix is one of:
- bump dateModified before we release a lease; or
- add a field like lastActiveEpoch and bump that; or
- in addition to looking for active leases, also look for recently destroyed leases.
The advantage of (1) is that it's simple; the advantage of (2) is that it's explicit; the advantage of (3) is that LeaseUpdateWorker won't have to mutate resources. This is probably the most desirable advantage.