Page MenuHomePhabricator

Reorganize PhutilDaemon into Overseers, Pools and Daemons in libphutil
ClosedPublic

Authored by epriestley on Feb 21 2017, 4:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 26, 3:26 PM
Unknown Object (File)
Fri, Mar 22, 10:25 PM
Unknown Object (File)
Fri, Mar 22, 2:12 PM
Unknown Object (File)
Fri, Mar 22, 2:12 PM
Unknown Object (File)
Tue, Mar 19, 5:55 PM
Unknown Object (File)
Tue, Mar 19, 5:55 PM
Unknown Object (File)
Feb 11 2024, 8:39 PM
Unknown Object (File)
Feb 3 2024, 2:41 PM
Subscribers
None

Details

Summary

Ref T12298. Ultimate goal is to let daemon pools scale down to 0 daemons when they aren't doing anything. This doesn't do that yet (and attempts to change no behavior).

This reorganizes the daemon code to make this change easier. Currently, some daemons are in pools and some are not. Intead, make everything a pool (the Pull and Trigger daemons just get pools with maximum size 1).

New object hiearchy is:

  • Overseer
    • Pool
      • Daemon

...and those objects each pretty much take care of their own stuff, instead of having daemons reach up into the Overseer to dispatch events back to themselves.

Test Plan
  • Ran phd debug, phd start, phd stop, phd status, etc.
  • Reviewed daemons in web console.
  • Changed config, saw daemons automatically restart.
  • Sent daemons signals.
  • Used --trace, activated memory tracing, activated verbose mode.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable