mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
No description
62b06f0f5d
Summary: We currently cache all connections in LiskDAO so we can roll back transactions when fixtured unit tests complete. Since we establish a new connection wrapper each time we establish a global lock, this cache currently grows without bound. Instead, pool global lock connections so we never have more than the largest number of locks we've held open at once (in PullLocalDaemon, always 1). Another way to solve this is probably to add an "onclose" callback to `AphrontDatabaseConnection` so that it can notify any caches that it been closed. However, we currently allow a connection to be later reopened (which seeems reasonable) so we'd need a callback for that too. This is much simpler, and this use case is unusual, so I'd like to wait for more use cases before pursing a more complicated fix. Test Plan: Ran this in a loop: while (true) { for ($ii = 0; $ii < 100; $ii++) { $lock = PhabricatorGlobalLock::newLock('derp'); $lock->lock(); $lock->unlock(); } $this->sleep(1); } Previously it leaked ~100KB/sec, now has stable memory usage. Reviewers: vrana, nh, btrahan Reviewed By: vrana CC: aran Maniphest Tasks: T1636 Differential Revision: https://secure.phabricator.com/D3239 |
||
---|---|---|
bin | ||
conf | ||
externals | ||
resources | ||
scripts | ||
src | ||
support/aphlict | ||
webroot | ||
.arcconfig | ||
.divinerconfig | ||
.gitignore | ||
.gitmodules | ||
README |
Phabricator is a open source collection of web applications which make it easier to write, review, and share source code. Phabricator was developed at Facebook. This is an early release. It's pretty high-quality and usable, but under active development so things may change quickly. You can learn more about the project and find links to documentation and resources at: http://phabricator.org/ LICENSE Phabricator is released under the Apache 2.0 license except as otherwise noted. http://www.apache.org/licenses/LICENSE-2.0