mononoke: increase hgcli buffer

Summary:
We can hit a deadlock during getfiles requests. We first send all requests via
stdin, and then read the output via stdout. The problem is that any of the
buffers anywhere between hg and mononoke may fill up, and the whole process
deadlocks.

Unfortunately there is no good solution yet. For now let's make the buffer in
hgcli big enough to make sure it won't be a problem. Let's bump it to 400Mb.
Note that the buffer will be allocated on demand in the channel. So it won't
use too much memory.

Reviewed By: sunshowers

Differential Revision: D8195511

fbshipit-source-id: bd97509bd26f8cea7d41e44933e02bd0bc2c76c4
This commit is contained in:
Stanislau Hlebik 2018-05-30 00:40:40 -07:00 committed by Facebook Github Bot
parent 2e24a77e85
commit af7cc5eb6c

View File

@ -18,9 +18,8 @@ use futures::{Future, Sink, Stream};
use futures::sync::mpsc::{channel, Receiver, Sender};
use futures_ext::{StreamExt, BoxStream};
const BUFSZ: usize = 8192;
const NUMBUFS: usize = 2;
const NUMBUFS: usize = 50000;
/// Async adapter for `Read`
#[derive(Debug)]