Fixed comparison in ForwardIterator when computing hint for GetNextLevelIndex()
Fixed comparison in ForwardIterator when computing hint for GetNextLevelIndex()

Summary: When computing the hint for GetNextLevelIndex(), ForwardIterator was doing a redundant comparison. This patch fixes the comparison (using https://github.com/facebook/rocksdb/blob/master/db/version_set.cc#L158 as a reference) and moves it inside an assert because we expect `level_files[f_idx]` to contain the next key after Seek(), so user_key should always be smaller than the largest key.

Test Plan: make clean all check

Reviewers: rven, anthony, yhchiang, igor, sdong

Reviewed By: sdong

Subscribers: tnovak, sdong, dhruba, leveldb

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

SunguckLee/RocksDB,biddyweb/rocksdb,JoeWoo/rocksdb,wat-ze-hex/rocksdb,bbiao/rocksdb,siddhartharay007/rocksdb,hobinyoon/rocksdb,norton/rocksdb,kaschaeffer/rocksdb,wat-ze-hex/rocksdb,SunguckLee/RocksDB,siddhartharay007/rocksdb,facebook/rocksdb,flabby/rocksdb,JackLian/rocksdb,norton/rocksdb,Andymic/rocksdb,norton/rocksdb,JohnPJenkins/rocksdb,tsheasha/rocksdb,jalexanderqed/rocksdb,flabby/rocksdb,Andymic/rocksdb,norton/rocksdb,Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,JohnPJenkins/rocksdb,norton/rocksdb,Andymic/rocksdb,JackLian/rocksdb,JoeWoo/rocksdb,facebook/rocksdb,vmx/rocksdb,geraldoandradee/rocksdb,JoeWoo/rocksdb,SunguckLee/RocksDB,wat-ze-hex/rocksdb,flabby/rocksdb,JoeWoo/rocksdb,jalexanderqed/rocksdb,JoeWoo/rocksdb,JackLian/rocksdb,JohnPJenkins/rocksdb,luckywhu/rocksdb,OverlordQ/rocksdb,wlqGit/rocksdb,JackLian/rocksdb,siddhartharay007/rocksdb,ryneli/rocksdb,caijieming-baidu/rocksdb,RyanTech/rocksdb,SunguckLee/RocksDB,JackLian/rocksdb,JoeWoo/rocksdb,RyanTech/rocksdb,JackLian/rocksdb,JohnPJenkins/rocksdb,wat-ze-hex/rocksdb,vmx/rocksdb,biddyweb/rocksdb,flabby/rocksdb,ryneli/rocksdb,geraldoandradee/rocksdb,facebook/rocksdb,vmx/rocksdb,JohnPJenkins/rocksdb,JoeWoo/rocksdb,hobinyoon/rocksdb,bbiao/rocksdb,wlqGit/rocksdb,tsheasha/rocksdb,RyanTech/rocksdb,Andymic/rocksdb,RyanTech/rocksdb,vmx/rocksdb,biddyweb/rocksdb,wenduo/rocksdb,kaschaeffer/rocksdb,caijieming-baidu/rocksdb,caijieming-baidu/rocksdb,caijieming-baidu/rocksdb,biddyweb/rocksdb,vmx/rocksdb,bbiao/rocksdb,luckywhu/rocksdb,jalexanderqed/rocksdb,kaschaeffer/rocksdb,bbiao/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,siddhartharay007/rocksdb,OverlordQ/rocksdb,jalexanderqed/rocksdb,Vaisman/rocksdb,wenduo/rocksdb,luckywhu/rocksdb,luckywhu/rocksdb,facebook/rocksdb,facebook/rocksdb,ryneli/rocksdb,siddhartharay007/rocksdb,hobinyoon/rocksdb,flabby/rocksdb,geraldoandradee/rocksdb,wlqGit/rocksdb,hobinyoon/rocksdb,kaschaeffer/rocksdb,kaschaeffer/rocksdb,OverlordQ/rocksdb,Vaisman/rocksdb,ryneli/rocksdb,kaschaeffer/rocksdb,biddyweb/rocksdb,caijieming-baidu/rocksdb,SunguckLee/RocksDB,wenduo/rocksdb,facebook/rocksdb,bbiao/rocksdb,facebook/rocksdb,jalexanderqed/rocksdb,norton/rocksdb,tsheasha/rocksdb,Vaisman/rocksdb,OverlordQ/rocksdb,siddhartharay007/rocksdb,luckywhu/rocksdb,wlqGit/rocksdb,vmx/rocksdb,tsheasha/rocksdb,RyanTech/rocksdb,hobinyoon/rocksdb,JohnPJenkins/rocksdb,Vaisman/rocksdb,wlqGit/rocksdb,luckywhu/rocksdb,JohnPJenkins/rocksdb,wenduo/rocksdb,Andymic/rocksdb,hobinyoon/rocksdb,wenduo/rocksdb,Vaisman/rocksdb,biddyweb/rocksdb,wenduo/rocksdb,caijieming-baidu/rocksdb,geraldoandradee/rocksdb,OverlordQ/rocksdb,kaschaeffer/rocksdb,wat-ze-hex/rocksdb,geraldoandradee/rocksdb,flabby/rocksdb,Vaisman/rocksdb,caijieming-baidu/rocksdb,JackLian/rocksdb,tsheasha/rocksdb,bbiao/rocksdb,jalexanderqed/rocksdb,jalexanderqed/rocksdb,wenduo/rocksdb,siddhartharay007/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,geraldoandradee/rocksdb,bbiao/rocksdb,geraldoandradee/rocksdb,Vaisman/rocksdb,hobinyoon/rocksdb,OverlordQ/rocksdb,wlqGit/rocksdb,flabby/rocksdb,RyanTech/rocksdb,bbiao/rocksdb,wlqGit/rocksdb,wat-ze-hex/rocksdb,wenduo/rocksdb,Andymic/rocksdb,vmx/rocksdb,wat-ze-hex/rocksdb,tsheasha/rocksdb,facebook/rocksdb,SunguckLee/RocksDB,hobinyoon/rocksdb,ryneli/rocksdb,biddyweb/rocksdb,tsheasha/rocksdb,norton/rocksdb,luckywhu/rocksdb,RyanTech/rocksdb,vmx/rocksdb,SunguckLee/RocksDB,OverlordQ/rocksdb