mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
85db1033d7
* sandbox: Don't hold on to old resources when resetting. Now there's one hell of a memory leak. CHANGELOG_BEGIN - [Sandbox] Fixed a memory leak when using the ResetService; not everything was cleaned up correctly. CHANGELOG_END * sandbox: Split out SandboxClientResource from SandboxServerResource. Gonna replace SandboxServerResource with a ResourceOwner acquisition. * sandbox: Don't capture the API server in the SandboxServer resource. When we reset, this is stored forever, leading to a memory leak. Tested by rewriting the SandboxServerResource to use `SandboxServer.owner`. * sandbox: Revert the test client resource to calling `shutdownNow()`. * sandbox: Make sure the fixture is recreated properly on each test run. * sandbox: Make `SandboxState` a non-case class. The `toString()` was unnecessarily heavy. * sandbox: Futures, futures everywhere. Avoid a race condition where the server is stopped before it starts by storing a `Future[SandboxState]` rather than the `SandboxState` itself. This doesn't trigger the same memory leak as storing a `Resource[SandboxState]` because we don't capture the object itself in the `flatMap` in the same way with `Future`. * sandbox: Remove an unused parameter left in for debugging. * sandbox: Replace `@VisibleForTesting` with a comment. * sandbox: Add more comments to the weird logic in SandboxServer. * sandbox: Get rid of the `Port` type alias; it was confusing. Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com> |
||
---|---|---|
.. | ||
src/main | ||
BUILD.bazel |