Fix archive WAL race conditions
Fix archive WAL race conditions

Summary: More race condition bugs with our archive WAL files. I do believe this caused t5988326, but can't reproduce the failure unfortunately.

Test Plan: make check

Reviewers: yhchiang, rven, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

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

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