fix memory leak in case of large number of retries
authorMainak Mandal <mmandal@fb.com>
Sat, 1 Apr 2017 02:01:12 +0000 (19:01 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 1 Apr 2017 02:08:27 +0000 (19:08 -0700)
commit8e16a2eb93a5a2764e370b63ca0f210b140cc308
treeefc431a6c8e2bc73c30790475976aad299e2d9b4
parentf1a4f400897ce459c74021481e403283bacb98f1
fix memory leak in case of large number of retries

Summary: Infinite retries is something that is often needed for read-modify-write like workflows. The current implementation was creating a nested chain of implicit promises. This manifests as a memory leak after some time. Worse yet, even if it succeeds, it will take a long time to churn thru the chain of promises.

Reviewed By: yfeldblum

Differential Revision: D4770335

fbshipit-source-id: 44b8d6df1084de4514b66919a9838cf2322d6dce
folly/Makefile.am
folly/futures/Future-inl.h
folly/futures/helpers.h
folly/futures/test/RetryingTest.cpp
folly/futures/test/TestExecutor.cpp [new file with mode: 0644]
folly/futures/test/TestExecutor.h [new file with mode: 0644]
folly/futures/test/TestExecutorTest.cpp [new file with mode: 0644]
folly/test/Makefile.am