Homec4science

Add a maximum read buffer size to ExecFuture

Authored by epriestley <git@epriestley.com> on Dec 16 2013, 21:32.

Description

Add a maximum read buffer size to ExecFuture

Summary:
Ref T4241. Currently, ExecFuture may read an arbitrarily large amount of data into memory during execution. In T4241, this arises specifically with git-upload-pack, which emits about as much data as the size of the repository. Currently, the subprocess emits this data far faster than we can send it over the network, so we end up with a huge in-process buffer containing the entire repository.

Instead, we want to throttle git-upload-pack until the network can catch up. This is the first step in letting that happen.

Test Plan: Added a unit test.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4241

Differential Revision: https://secure.phabricator.com/D7772

Details

Committed
epriestley <git@epriestley.com>Dec 16 2013, 21:32
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUc2c800dcd0e3: Make PhutilChannel::waitForAny more reasonable about detecting unselectable…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU898cdef4c957: Add a maximum read buffer size to ExecFuture (authored by epriestley <git@epriestley.com>).Dec 16 2013, 21:32