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)
Sun, Nov 10, 8:05 AM
Unknown Object (File)
Wed, Oct 23, 5:45 AM
Unknown Object (File)
Oct 19 2024, 5:23 PM
Unknown Object (File)
Oct 18 2024, 4:10 PM
Unknown Object (File)
Oct 12 2024, 2:24 AM
Unknown Object (File)
Oct 10 2024, 10:48 PM
Unknown Object (File)
Sep 16 2024, 12:30 AM
Unknown Object (File)
Sep 5 2024, 11:00 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
Branch
pool1
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/daemon/PhutilDaemonOverseer.php:204XHP16TODO Comment
Advicesrc/daemon/PhutilDaemonPool.php:71XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 15710
Build 20753: Run Core Tests
Build 20752: arc lint + arc unit