mononoke/fastreplay: fix off-by-one in load tracking

Summary:
When max concurrency is 1, we should process at most one request concurrently,
not 2!  This had resulted in a flaky test since we're processing traffic out of
order there.

Reviewed By: HarveyHunt

Differential Revision: D19948594

fbshipit-source-id: 00268926095fdbbfdfd5a23366aafcfb763580f4
This commit is contained in:
Thomas Orozco 2020-02-18 04:22:16 -08:00 committed by Facebook Github Bot
parent 1e50a66174
commit cf4d9c9f1f
2 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ async fn fastreplay<R: AsyncRead + Unpin>(
let config = opts.config.get();
if load > config.max_concurrency()?.get() {
if load >= config.max_concurrency()?.get() {
warn!(
&logger,
"Waiting for some requests to complete (load: {})...", load

View File

@ -97,8 +97,8 @@ Check logging structure
> EOF
$ quiet fastreplay --live-config "file:${live_config}" --debug --scuba-log-file "$fastreplay_log" < "$WIREPROTO_LOGGING_PATH"
$ grep "Replay Succeeded" "$fastreplay_log" | jq .normal.command
"gettreepack"
"getbundle"
"gettreepack"
"getpackv1"
# Check that replaying works with arguments