Only execute flush from compaction if max_background_flushes = 0
Only execute flush from compaction if max_background_flushes = 0

Summary: As title. We shouldn't need to execute flush from compaction if there are dedicated threads doing flushes.

Test Plan: make check

Reviewers: rven, yhchiang, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

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

kaschaeffer/rocksdb,makelivedotnet/rocksdb,fengshao0907/rocksdb,amyvmiwei/rocksdb,flabby/rocksdb,OverlordQ/rocksdb,lgscofield/rocksdb,SunguckLee/RocksDB,biddyweb/rocksdb,RyanTech/rocksdb,bbiao/rocksdb,facebook/rocksdb,wskplho/rocksdb,hobinyoon/rocksdb,Andymic/rocksdb,caijieming-baidu/rocksdb,kaschaeffer/rocksdb,rDSN-Projects/rocksdb.replicated,ryneli/rocksdb,Applied-Duality/rocksdb,alihalabyah/rocksdb,JoeWoo/rocksdb,zhangpng/rocksdb,RyanTech/rocksdb,hobinyoon/rocksdb,Applied-Duality/rocksdb,vashstorm/rocksdb,IMCG/RcoksDB,facebook/rocksdb,JoeWoo/rocksdb,siddhartharay007/rocksdb,mbarbon/rocksdb,caijieming-baidu/rocksdb,rDSN-Projects/rocksdb.replicated,biddyweb/rocksdb,sorphi/rocksdb,vmx/rocksdb,wat-ze-hex/rocksdb,JoeWoo/rocksdb,lgscofield/rocksdb,facebook/rocksdb,wat-ze-hex/rocksdb,wskplho/rocksdb,OverlordQ/rocksdb,hobinyoon/rocksdb,NickCis/rocksdb,jalexanderqed/rocksdb,SunguckLee/RocksDB,sorphi/rocksdb,virtdb/rocksdb,siddhartharay007/rocksdb,wenduo/rocksdb,kaschaeffer/rocksdb,ylong/rocksdb,wskplho/rocksdb,hobinyoon/rocksdb,JackLian/rocksdb,virtdb/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,RyanTech/rocksdb,tizzybec/rocksdb,bbiao/rocksdb,sorphi/rocksdb,tsheasha/rocksdb,rDSN-Projects/rocksdb.replicated,JohnPJenkins/rocksdb,anagav/rocksdb,jalexanderqed/rocksdb,biddyweb/rocksdb,anagav/rocksdb,Andymic/rocksdb,Andymic/rocksdb,skunkwerks/rocksdb,NickCis/rocksdb,flabby/rocksdb,geraldoandradee/rocksdb,vmx/rocksdb,zhangpng/rocksdb,RyanTech/rocksdb,temicai/rocksdb,wenduo/rocksdb,vmx/rocksdb,IMCG/RcoksDB,temicai/rocksdb,wlqGit/rocksdb,IMCG/RcoksDB,jalexanderqed/rocksdb,JohnPJenkins/rocksdb,wskplho/rocksdb,bbiao/rocksdb,facebook/rocksdb,JackLian/rocksdb,mbarbon/rocksdb,alihalabyah/rocksdb,ylong/rocksdb,kaschaeffer/rocksdb,siddhartharay007/rocksdb,facebook/rocksdb,ylong/rocksdb,wlqGit/rocksdb,bbiao/rocksdb,wenduo/rocksdb,wenduo/rocksdb,jalexanderqed/rocksdb,Vaisman/rocksdb,wat-ze-hex/rocksdb,sorphi/rocksdb,tsheasha/rocksdb,Andymic/rocksdb,JohnPJenkins/rocksdb,facebook/rocksdb,JohnPJenkins/rocksdb,SunguckLee/RocksDB,siddhartharay007/rocksdb,wskplho/rocksdb,Andymic/rocksdb,makelivedotnet/rocksdb,biddyweb/rocksdb,NickCis/rocksdb,tizzybec/rocksdb,tizzybec/rocksdb,dkorolev/rocksdb,NickCis/rocksdb,mbarbon/rocksdb,Applied-Duality/rocksdb,kaschaeffer/rocksdb,temicai/rocksdb,facebook/rocksdb,IMCG/RcoksDB,siddhartharay007/rocksdb,tsheasha/rocksdb,vashstorm/rocksdb,geraldoandradee/rocksdb,dkorolev/rocksdb,dkorolev/rocksdb,anagav/rocksdb,OverlordQ/rocksdb,RyanTech/rocksdb,geraldoandradee/rocksdb,alihalabyah/rocksdb,norton/rocksdb,temicai/rocksdb,norton/rocksdb,IMCG/RcoksDB,wat-ze-hex/rocksdb,kaschaeffer/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,caijieming-baidu/rocksdb,biddyweb/rocksdb,tizzybec/rocksdb,tsheasha/rocksdb,ylong/rocksdb,vmx/rocksdb,hobinyoon/rocksdb,OverlordQ/rocksdb,mbarbon/rocksdb,hobinyoon/rocksdb,zhangpng/rocksdb,caijieming-baidu/rocksdb,Vaisman/rocksdb,bbiao/rocksdb,wskplho/rocksdb,vmx/rocksdb,Andymic/rocksdb,amyvmiwei/rocksdb,vashstorm/rocksdb,tsheasha/rocksdb,temicai/rocksdb,rDSN-Projects/rocksdb.replicated,lgscofield/rocksdb,caijieming-baidu/rocksdb,JackLian/rocksdb,zhangpng/rocksdb,norton/rocksdb,dkorolev/rocksdb,facebook/rocksdb,dkorolev/rocksdb,Applied-Duality/rocksdb,geraldoandradee/rocksdb,vashstorm/rocksdb,lgscofield/rocksdb,anagav/rocksdb,sorphi/rocksdb,luckywhu/rocksdb,flabby/rocksdb,biddyweb/rocksdb,OverlordQ/rocksdb,alihalabyah/rocksdb,fengshao0907/rocksdb,wenduo/rocksdb,mbarbon/rocksdb,ryneli/rocksdb,skunkwerks/rocksdb,skunkwerks/rocksdb,SunguckLee/RocksDB,norton/rocksdb,fengshao0907/rocksdb,amyvmiwei/rocksdb,RyanTech/rocksdb,vashstorm/rocksdb,lgscofield/rocksdb,fengshao0907/rocksdb,virtdb/rocksdb,flabby/rocksdb,JackLian/rocksdb,JoeWoo/rocksdb,amyvmiwei/rocksdb,IMCG/RcoksDB,ryneli/rocksdb,Applied-Duality/rocksdb,flabby/rocksdb,dkorolev/rocksdb,JackLian/rocksdb,caijieming-baidu/rocksdb,amyvmiwei/rocksdb,mbarbon/rocksdb,Andymic/rocksdb,tizzybec/rocksdb,wlqGit/rocksdb,luckywhu/rocksdb,temicai/rocksdb,JoeWoo/rocksdb,alihalabyah/rocksdb,siddhartharay007/rocksdb,alihalabyah/rocksdb,caijieming-baidu/rocksdb,NickCis/rocksdb,alihalabyah/rocksdb,ryneli/rocksdb,anagav/rocksdb,wat-ze-hex/rocksdb,dkorolev/rocksdb,NickCis/rocksdb,wenduo/rocksdb,temicai/rocksdb,Vaisman/rocksdb,virtdb/rocksdb,ylong/rocksdb,ryneli/rocksdb,NickCis/rocksdb,biddyweb/rocksdb,wlqGit/rocksdb,Vaisman/rocksdb,amyvmiwei/rocksdb,luckywhu/rocksdb,bbiao/rocksdb,Vaisman/rocksdb,makelivedotnet/rocksdb,vmx/rocksdb,luckywhu/rocksdb,sorphi/rocksdb,geraldoandradee/rocksdb,virtdb/rocksdb,geraldoandradee/rocksdb,SunguckLee/RocksDB,wat-ze-hex/rocksdb,jalexanderqed/rocksdb,bbiao/rocksdb,zhangpng/rocksdb,Vaisman/rocksdb,norton/rocksdb,wlqGit/rocksdb,wenduo/rocksdb,norton/rocksdb,siddhartharay007/rocksdb,Vaisman/rocksdb,tizzybec/rocksdb,skunkwerks/rocksdb,jalexanderqed/rocksdb,JohnPJenkins/rocksdb,JohnPJenkins/rocksdb,skunkwerks/rocksdb,virtdb/rocksdb,tsheasha/rocksdb,zhangpng/rocksdb,wlqGit/rocksdb,JoeWoo/rocksdb,hobinyoon/rocksdb,hobinyoon/rocksdb,OverlordQ/rocksdb,OverlordQ/rocksdb,tsheasha/rocksdb,luckywhu/rocksdb,JackLian/rocksdb,rDSN-Projects/rocksdb.replicated,luckywhu/rocksdb,makelivedotnet/rocksdb,sorphi/rocksdb,lgscofield/rocksdb,rDSN-Projects/rocksdb.replicated,flabby/rocksdb,rDSN-Projects/rocksdb.replicated,wlqGit/rocksdb,zhangpng/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,norton/rocksdb,lgscofield/rocksdb,JohnPJenkins/rocksdb,flabby/rocksdb,luckywhu/rocksdb,makelivedotnet/rocksdb,mbarbon/rocksdb,tizzybec/rocksdb,ryneli/rocksdb,Applied-Duality/rocksdb,RyanTech/rocksdb,wenduo/rocksdb,vashstorm/rocksdb,amyvmiwei/rocksdb,ylong/rocksdb,wat-ze-hex/rocksdb,vashstorm/rocksdb,JackLian/rocksdb,virtdb/rocksdb,vmx/rocksdb,fengshao0907/rocksdb,Applied-Duality/rocksdb,jalexanderqed/rocksdb,skunkwerks/rocksdb,ylong/rocksdb,fengshao0907/rocksdb,IMCG/RcoksDB,JoeWoo/rocksdb,kaschaeffer/rocksdb,vmx/rocksdb,makelivedotnet/rocksdb,geraldoandradee/rocksdb,anagav/rocksdb,makelivedotnet/rocksdb,skunkwerks/rocksdb,tsheasha/rocksdb,fengshao0907/rocksdb,SunguckLee/RocksDB,anagav/rocksdb,Andymic/rocksdb,wskplho/rocksdb