Igor Canadi 91ddd587cc Only signal cond variable if need to
Summary:
At the end of BackgroundCallCompaction(), we call SignalAll(), even though we don't need to. If compaction hasn't done anything and there's another compaction running, there is no need to signal on the condition variable. Doing so creates a tight feedback loop which results in log files like:

   wait for memtable flush
   compaction nothing to do
   wait for memtable flush
   compaction nothing to do

This change eliminates that

Test Plan:
make check
Also:

    icanadi@dev1440 ~ $ grep "nothing to do" /fast-rocksdb-tmp/rocksdb_test/column_family_test/LOG | wc -l
    7435
    icanadi@dev1440 ~ $ grep "nothing to do" /fast-rocksdb-tmp/rocksdb_test/column_family_test/LOG | wc -l
    372

First version is before the change, second version is after the change.

Reviewers: dhruba, ljin, haobo, yhchiang, sdong

Reviewed By: sdong

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D18855
2014-06-02 17:23:55 -07:00
..
2014-04-27 20:57:10 +01:00
2014-05-21 11:43:35 -07:00
2014-05-21 11:43:35 -07:00
2014-05-21 11:43:35 -07:00
2014-05-21 11:43:35 -07:00
2014-04-24 14:56:41 -04:00
2014-05-30 14:31:55 -07:00
2014-05-21 11:43:35 -07:00
2014-06-02 17:23:55 -07:00
2014-05-30 14:31:55 -07:00
2014-04-14 10:48:01 -07:00
2014-04-15 13:39:26 -07:00
2014-05-21 11:43:35 -07:00
2014-04-08 10:58:07 -07:00
2014-05-30 14:31:55 -07:00
2014-05-30 14:31:55 -07:00
2014-05-30 14:31:55 -07:00
2014-02-28 13:19:47 -08:00
2014-01-27 14:49:10 -08:00
2014-03-14 22:44:35 +00:00
2014-04-25 09:51:16 -04:00
2014-04-28 23:46:24 -04:00
2014-03-14 13:02:20 -07:00
2014-01-30 22:10:10 -08:00
2014-04-15 13:39:26 -07:00
2014-05-21 11:43:35 -07:00
2014-05-30 14:31:55 -07:00