Skip to content

Commit 00a242a

Browse files
committed
adding flushall after memtier benchmark failure. Otherwise the database may be in a corrupted state for the next test
1 parent 30ba22f commit 00a242a

File tree

1 file changed

+8
-0
lines changed
  • redis_benchmarks_specification/__runner__

1 file changed

+8
-0
lines changed

redis_benchmarks_specification/__runner__/runner.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,6 +2671,14 @@ def delete_temporary_files(
26712671

26722672
if not success:
26732673
logging.error(f"Memtier benchmark failed: {stderr}")
2674+
# Clean up database after failure (timeout or error)
2675+
if args.flushall_on_every_test_end or args.flushall_on_every_test_start:
2676+
logging.warning("Benchmark failed - cleaning up database with FLUSHALL")
2677+
try:
2678+
for r in redis_conns:
2679+
r.flushall()
2680+
except Exception as e:
2681+
logging.error(f"FLUSHALL failed after benchmark failure: {e}")
26742682
# Continue with the test but log the failure
26752683
client_container_stdout = f"ERROR: {stderr}"
26762684

0 commit comments

Comments
 (0)