Skip to content
  • Yueh-Hsuan Chiang's avatar
    Add timeout_hint_us to WriteOptions and introduce Status::TimeOut. · d4d338de
    Yueh-Hsuan Chiang authored
    Summary:
    This diff adds timeout_hint_us to WriteOptions.  If it's non-zero, then
    1) writes associated with this options MAY be aborted when it has been
      waiting for longer than the specified time.  If an abortion happens,
      associated writes will return Status::TimeOut.
    2) the stall time of the associated write caused by flush or compaction
      will be limited by timeout_hint_us.
    
    The default value of timeout_hint_us is 0 (i.e., OFF.)
    
    The statistics of timeout writes will be recorded in WRITE_TIMEDOUT.
    
    Test Plan:
    export ROCKSDB_TESTS=WriteTimeoutAndDelayTest
    make db_test
    ./db_test
    
    Reviewers: igor, ljin, haobo, sdong
    
    Reviewed By: sdong
    
    Subscribers: dhruba, leveldb
    
    Differential Revision: https://reviews.facebook.net/D18837
    d4d338de