• V
    [Kill randomly at various points in source code for testing] · 760dd475
    Vamsi Ponnekanti 提交于
    Summary:
    This is initial version. A few ways in which this could
    be extended in the future are:
    (a) Killing from more places in source code
    (b) Hashing stack and using that hash in determining whether to crash.
        This is to avoid crashing more often at source lines that are executed
        more often.
    (c) Raising exceptions or returning errors instead of killing
    
    Test Plan:
    This whole thing is for testing.
    
    Here is part of output:
    
    python2.7 tools/db_crashtest2.py -d 600
    Running db_stress
    
    db_stress retncode -15 output LevelDB version     : 1.5
    Number of threads   : 32
    Ops per thread      : 10000000
    Read percentage     : 50
    Write-buffer-size   : 4194304
    Delete percentage   : 30
    Max key             : 1000
    Ratio #ops/#keys    : 320000
    Num times DB reopens: 0
    Batches/snapshots   : 1
    Purge redundant %   : 50
    Num keys per lock   : 4
    Compression         : snappy
    ------------------------------------------------
    No lock creation because test_batches_snapshots set
    2013/04/26-17:55:17  Starting database operations
    Created bg thread 0x7fc1f07ff700
    ... finished 60000 ops
    Running db_stress
    
    db_stress retncode -15 output LevelDB version     : 1.5
    Number of threads   : 32
    Ops per thread      : 10000000
    Read percentage     : 50
    Write-buffer-size   : 4194304
    Delete percentage   : 30
    Max key             : 1000
    Ratio #ops/#keys    : 320000
    Num times DB reopens: 0
    Batches/snapshots   : 1
    Purge redundant %   : 50
    Num keys per lock   : 4
    Compression         : snappy
    ------------------------------------------------
    Created bg thread 0x7ff0137ff700
    No lock creation because test_batches_snapshots set
    2013/04/26-17:56:15  Starting database operations
    ... finished 90000 ops
    
    Revert Plan: OK
    
    Task ID: #2252691
    
    Reviewers: dhruba, emayanke
    
    Reviewed By: emayanke
    
    CC: leveldb, haobo
    
    Differential Revision: https://reviews.facebook.net/D10581
    760dd475
db_crashtest2.py 3.7 KB