Islam AbdelRahman d52f334cbd Break stalls when no bg work is happening
Summary:
Current stall will keep sleeping even if there is no Flush/Compactions to wait for, I changed the logic to break the stall if we are not flushing or compacting

db_bench command used
```
# fillrandom
# memtable size = 10MB
# value size = 1 MB
# num = 1000
# use /dev/shm
./db_bench --benchmarks="fillrandom,stats" --value_size=1048576 --write_buffer_size=10485760 --num=1000 --delayed_write_rate=XXXXX  --db="/dev/shm/new_stall" | grep "Cumulative stall"
```

```
Current results

# delayed_write_rate = 1000 Kb/sec
Cumulative stall: 00:00:9.031 H:M:S

# delayed_write_rate = 200 Kb/sec
Cumulative stall: 00:00:22.314 H:M:S

# delayed_write_rate = 100 Kb/sec
Cumulative stall: 00:00:42.784 H:M:S

# delayed_write_rate = 50 Kb/sec
Cumulative stall: 00:01:23.785 H:M:S

# delayed_write_rate = 25 Kb/sec
Cumulative stall: 00:02:45.702 H:M:S
```

```
New results

# delayed_write_rate = 1000 Kb/sec
Cumulative stall: 00:00:9.017 H:M:S

# delayed_write_rate = 200 Kb/sec
Cumulative stall: 00
Closes https://github.com/facebook/rocksdb/pull/1884

Differential Revision: D4585439

Pulled By: IslamAbdelRahman

fbshipit-source-id: aed2198
2017-03-16 18:24:17 -07:00
..
2017-01-11 16:54:12 -08:00
2016-12-05 17:39:17 -08:00
2016-08-19 12:28:19 -07:00
2016-08-19 12:28:19 -07:00
2017-02-13 11:09:13 -08:00
2017-02-06 14:54:18 -08:00
2016-09-13 12:08:22 -07:00
2016-05-06 17:42:50 -07:00
2016-12-22 13:09:19 -08:00
2016-12-01 10:09:22 -08:00
2016-03-11 22:56:25 -08:00
2017-03-10 11:24:09 -08:00
2017-02-23 11:25:36 -08:00
2017-02-23 11:25:36 -08:00
2016-11-09 15:09:18 -08:00
2016-12-22 13:09:19 -08:00
2016-12-22 13:09:19 -08:00
2017-03-13 09:54:11 -07:00
2017-03-13 09:54:11 -07:00
2016-12-14 19:24:25 -08:00
2017-03-07 13:54:12 -08:00
2016-02-17 20:22:40 +08:00
2016-10-29 16:09:18 -07:00
2016-12-13 18:39:14 -08:00
2016-06-10 16:37:36 -07:00
2017-03-08 22:24:15 -08:00
2017-01-03 18:39:14 -08:00
2016-04-01 11:06:06 -07:00
2017-03-13 11:54:10 -07:00
2017-02-06 14:54:18 -08:00
2017-02-06 14:54:18 -08:00