• A
    Handle mixed slowdown/no_slowdown writer properly (#4475) · 854a4be0
    Anand Ananthabhotla 提交于
    Summary:
    There is a bug when the write queue leader is blocked on a write
    delay/stop, and the queue has writers with WriteOptions::no_slowdown set
    to true. They are not woken up until the write stall is cleared.
    
    The fix introduces a dummy writer inserted at the tail to indicate a
    write stall and prevent further inserts into the queue, and a condition
    variable that writers who can tolerate slowdown wait on before adding
    themselves to the queue. The leader calls WriteThread::BeginWriteStall()
    to add the dummy writer and then walk the queue to fail any writers with
    no_slowdown set. Once the stall clears, the leader calls
    WriteThread::EndWriteStall() to remove the dummy writer and signal the
    condition variable.
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/4475
    
    Differential Revision: D10285827
    
    Pulled By: anand1976
    
    fbshipit-source-id: 747465e5e7f07a829b1fb0bc1afcd7b93f4ab1a9
    854a4be0
db_test.cc 202.5 KB