From f263b6daf3a2672acc383dc34ed1ff1fe19da5a7 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Wed, 5 Apr 2023 14:45:42 +0300 Subject: [PATCH] Increase threshold for flaky cache reclaim test (#12004) This test produces 1GB of data and moves it around, and was expecting less than 500kb to be present in the system page cache. It sometimes fails with up to some 6mb in the page cache (0 in the actual RDB files), increasing the threshold. It looks like some background tasks in the container are occupying the page cache. It is safe to ignore the above since we also explicitly check the pages of our dump.rdb are not cached (matching `vmtouch -v` to `0%`). An additional fix is to match ` 0%` (add space), so that we don't successfully match `10%`. details in https://github.com/redis/redis/pull/11818 --- .github/workflows/daily.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 266834675..5b7a86867 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -323,10 +323,10 @@ jobs: ./src/redis-cli -p 8080 save > /dev/null VMOUT=$(vmtouch -v /tmp/master/dump.rdb) echo $VMOUT - grep -q "0%" <<< $VMOUT + grep -q " 0%" <<< $VMOUT CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}') echo "$CACHE" - if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then exit 1; fi + if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi echo "test replication doesn't increase cache" ./src/redis-cli -p 8081 REPLICAOF 127.0.0.1 8080 > /dev/null @@ -334,13 +334,13 @@ jobs: sleep 1 # wait for the completion of cache reclaim bio VMOUT=$(vmtouch -v /tmp/master/dump.rdb) echo $VMOUT - grep -q "0%" <<< $VMOUT + grep -q " 0%" <<< $VMOUT VMOUT=$(vmtouch -v /tmp/slave/dump.rdb) echo $VMOUT - grep -q "0%" <<< $VMOUT + grep -q " 0%" <<< $VMOUT CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}') echo "$CACHE" - if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then exit 1; fi + if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi echo "test reboot doesn't increase cache" PID=$(cat /tmp/master/redis.pid) @@ -351,10 +351,10 @@ jobs: sleep 1 # wait for the completion of cache reclaim bio VMOUT=$(vmtouch -v /tmp/master/dump.rdb) echo $VMOUT - grep -q "0%" <<< $VMOUT + grep -q " 0%" <<< $VMOUT CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}') echo "$CACHE" - if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then exit 1; fi + if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi test-valgrind-test: runs-on: ubuntu-latest