Page MenuHomePhabricator

After a Drydock lease triggers a resource to be reclaimed, stop it from triggering another reclaim until the first one completes
ClosedPublic

Authored by epriestley on Oct 24 2018, 4:15 PM.
Tags
None
Referenced Files
F18837072: D19753.diff
Mon, Oct 27, 4:16 AM
F18825117: D19753.id47185.diff
Thu, Oct 23, 7:41 PM
F18815248: D19753.diff
Tue, Oct 21, 1:28 AM
F18750714: D19753.id47186.diff
Sat, Oct 4, 8:44 AM
F18750613: D19753.diff
Sat, Oct 4, 8:26 AM
F18710368: D19753.diff
Sep 29 2025, 2:03 AM
F18676443: D19753.id47185.diff
Sep 25 2025, 7:20 PM
F18652559: D19753.id47186.diff
Sep 21 2025, 8:36 AM
Subscribers
Restricted Owners Package

Details

Summary

Depends on D19752. Ref T13210. If resources take a long time to reclaim/destroy (normally, more than 15 seconds) a single new lease may update several times during the reclaim/destroy process and end up reclaiming multiple resources.

Instead: after a lease triggers a reclaim, prevent it from triggering another reclaim as long as the resource it is reclaiming hasn't finished its reclaim/destroy cycle. Basically, each lease only gets to destroy one resource at a time.

Test Plan
  • Added a sleep(120) to destroyResource() to simulate a long reclaim/destroy cycle.
  • Allocated A, A, A working copies. Leased a B working copy.
  • Before patch: saw "B" lease destroy all three "A" working copies after ~0, ~15, and ~30 seconds, then build a new "B" resource after ~120 seconds (when the first reclaim/destroy finished).
  • After patch: saw "B" lease destroy one "A" working copy after ~0 seconds, then wait patiently until it finished up, then build a new "B" resource.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable