HomePhabricator
Diffusion Comm efbbde6e7eb5

Ensure Server{Write/Read/Bidi}ReactorBase derived class instance is deallocated…

Description

Ensure Server{Write/Read/Bidi}ReactorBase derived class instance is deallocated after all thread pool tasks writing to its memory complete

Summary: This differential introduces changes that ensure all tasks scheduled in the thread pool that write to memory allocated for reactor instance complete before reactor memory is freed. This differential spans over 3 files but changes are almost identical - reviewing one file is enough.

Test Plan:

  1. Launch blob service without this differential (both locally and on AWS (MUST!!!)).
  2. Execute yarn run-performance-tests blob several times (remember to change IP address in blob_performance_tests.rs if using AWS). It will crash (malloc error) every 3 - 4 run.
  3. Introduce this differential. Repeate step 1.
  4. Execute yarn run-performance-tests blob at least 20 times. Ensure crash disappears. On AWS single run of this test may take up to a couple of minutes depending on you internet connection quality. Do not be afraid if you see messages like:

test blob_performance_test has been running for over 60 seconds. After applying this diff test will finally succeed.

Reviewers: tomek, jon

Reviewed By: tomek

Subscribers: ashoat, atul, abosh

Differential Revision: https://phab.comm.dev/D5367