Limit key range to number of keys, not number of writes
Limit key range to number of keys, not number of writes

Summary:
An old commit (482401) changed DoWrite to use the value of --writes rather
than --num to determine the range for keys. This restores the old and correct
behavior which is to limit it using --num.

Task ID: #6353043

Blame Rev:

Test Plan:
run db_bench

Revert Plan:

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Reviewers: igor

Reviewed By: igor

Subscribers: dhruba

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

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