Remove duplicated code
Remove duplicated code

Summary: Call Flush() function instead

Test Plan: make all check

Reviewers: igor

Reviewed By: igor

Subscribers: dhruba

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

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