From cf4d9c9f1f77afd778b4a73a00b3c0a3db8ab7aa Mon Sep 17 00:00:00 2001 From: Thomas Orozco Date: Tue, 18 Feb 2020 04:22:16 -0800 Subject: [PATCH] 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 --- eden/mononoke/fastreplay/src/main.rs | 2 +- eden/mononoke/tests/integration/test-fastreplay-inline-args.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eden/mononoke/fastreplay/src/main.rs b/eden/mononoke/fastreplay/src/main.rs index a788db1b9f..69166620a4 100644 --- a/eden/mononoke/fastreplay/src/main.rs +++ b/eden/mononoke/fastreplay/src/main.rs @@ -388,7 +388,7 @@ async fn fastreplay( 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 diff --git a/eden/mononoke/tests/integration/test-fastreplay-inline-args.t b/eden/mononoke/tests/integration/test-fastreplay-inline-args.t index dbeab4c5b4..594fc57c4d 100644 --- a/eden/mononoke/tests/integration/test-fastreplay-inline-args.t +++ b/eden/mononoke/tests/integration/test-fastreplay-inline-args.t @@ -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