Fixed nullptr deref and added assert
Fixed nullptr deref and added assert

Summary:
Fixes two minor issues in CompactionJob.
CompactionJob::Run() dereferences log_buffer_ without a check, so
this patch adds an assert in the constructor where log_buffer_
is assigned. compaction_job_stats_ can be null but
ProcessKeyValueCompaction was dereferencing it without a check.

Test Plan: make && make check

Reviewers: sdong, rven, yhchiang, igor

Reviewed By: igor

Subscribers: dhruba, leveldb

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

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