Use condition variable in log roller test
Use condition variable in log roller test

Summary:
Previously I just slept until the flush_thread was "probably" ready
since proper synchronization in test cases seemed like overkill. But then tsan
complained about it, so I did the synchronization (mostly) properly now.

Test Plan:
  $ COMPILE_WITH_TSAN=1 make -j32 auto_roll_logger_test
  $ ./auto_roll_logger_test

Reviewers: anthony, IslamAbdelRahman, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D54399

bbiao/rocksdb,jalexanderqed/rocksdb,vmx/rocksdb,tsheasha/rocksdb,Andymic/rocksdb,flabby/rocksdb,Andymic/rocksdb,vmx/rocksdb,wat-ze-hex/rocksdb,tsheasha/rocksdb,wat-ze-hex/rocksdb,wenduo/rocksdb,vmx/rocksdb,Andymic/rocksdb,ryneli/rocksdb,norton/rocksdb,tsheasha/rocksdb,jalexanderqed/rocksdb,facebook/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,wenduo/rocksdb,hobinyoon/rocksdb,OverlordQ/rocksdb,Andymic/rocksdb,wat-ze-hex/rocksdb,jalexanderqed/rocksdb,SunguckLee/RocksDB,OverlordQ/rocksdb,wenduo/rocksdb,OverlordQ/rocksdb,hobinyoon/rocksdb,wat-ze-hex/rocksdb,vmx/rocksdb,wenduo/rocksdb,wat-ze-hex/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,bbiao/rocksdb,wenduo/rocksdb,hobinyoon/rocksdb,bbiao/rocksdb,norton/rocksdb,wenduo/rocksdb,norton/rocksdb,norton/rocksdb,OverlordQ/rocksdb,ryneli/rocksdb,bbiao/rocksdb,Andymic/rocksdb,facebook/rocksdb,wenduo/rocksdb,facebook/rocksdb,tsheasha/rocksdb,hobinyoon/rocksdb,tsheasha/rocksdb,norton/rocksdb,SunguckLee/RocksDB,flabby/rocksdb,hobinyoon/rocksdb,bbiao/rocksdb,facebook/rocksdb,jalexanderqed/rocksdb,bbiao/rocksdb,Andymic/rocksdb,facebook/rocksdb,hobinyoon/rocksdb,vmx/rocksdb,wat-ze-hex/rocksdb,flabby/rocksdb,OverlordQ/rocksdb,facebook/rocksdb,vmx/rocksdb,OverlordQ/rocksdb,vmx/rocksdb,Andymic/rocksdb,jalexanderqed/rocksdb,norton/rocksdb,OverlordQ/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,ryneli/rocksdb,facebook/rocksdb,flabby/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,hobinyoon/rocksdb,flabby/rocksdb,tsheasha/rocksdb,jalexanderqed/rocksdb,bbiao/rocksdb,flabby/rocksdb,Andymic/rocksdb,facebook/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,ryneli/rocksdb,wenduo/rocksdb,flabby/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,hobinyoon/rocksdb,wat-ze-hex/rocksdb,jalexanderqed/rocksdb,norton/rocksdb,tsheasha/rocksdb,vmx/rocksdb,SunguckLee/RocksDB