Skip to content

Commit

Permalink
crash_test: use large max_manifest_file_size most of the time. (faceb…
Browse files Browse the repository at this point in the history
…ook#6034)

Summary:
Right now, crash_test always uses 16KB max_manifest_file_size value. It is good to cover logic of manifest file switch. However, information stored in manifest files might be useful in debugging failures. Switch to only use small manifest file size in 1/15 of the time.
Pull Request resolved: facebook#6034

Test Plan: Observe command generated by db_crash_test.py multiple times and see the --max_manifest_file_size value distribution.

Differential Revision: D18513824

fbshipit-source-id: 7b3ae6dbe521a0918df41064e3fa5ecbf2466e04
  • Loading branch information
siying authored and facebook-github-bot committed Nov 14, 2019
1 parent 1ce28b7 commit 8bc42a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/db_crashtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
"periodic_compaction_seconds" :
lambda: random.choice([0, 0, 1, 2, 10, 100, 1000]),
"compaction_ttl" : lambda: random.choice([0, 0, 1, 2, 10, 100, 1000]),
# Test small max_manifest_file_size in a smaller chance, as most of the
# time we wnat manifest history to be preserved to help debug
"max_manifest_file_size" : lambda : random.choice(
[t * 16384 if t < 3 else 1024 * 1024 * 1024 for t in range(1,30)])
}

_TEST_DIR_ENV_VAR = 'TEST_TMPDIR'
Expand Down

0 comments on commit 8bc42a7

Please sign in to comment.