]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fix bugs in FilePickerMultiGet (#5292)
authoranand76 <anand76@devvm1373.frc2.facebook.com>
Thu, 9 May 2019 20:03:37 +0000 (13:03 -0700)
committeranand76 <anand76@devvm1373.frc2.facebook.com>
Fri, 24 May 2019 20:19:55 +0000 (13:19 -0700)
commit9feb730c6e4ee637c5a25bad77fb5d954eb241f7
treeb9a717628681208d61a6fd3f7eae7370538bfec6
parent70dca18c9615038bd926aeea5fc4e8770a6f865d
Fix bugs in FilePickerMultiGet (#5292)

Summary:
This PR fixes a couple of bugs in FilePickerMultiGet that were causing db_stress test failures. The failures were caused by -
1. Improper handling of a key that matches the user key portion of an L0 file's largest key. In this case, the curr_index_in_curr_level file index in L0 for that key was getting incremented, but batch_iter_ was not advanced. By design, all keys in a batch are supposed to be checked against an L0 file before advancing to the next L0 file. Not advancing to the next key in the batch was causing a double increment of curr_index_in_curr_level due to the same key being processed again
2. Improper handling of a key that matches the user key portion of the largest key in the last file of L1 and higher. This was resulting in a premature end to the processing of the batch for that level when the next key in the batch is a duplicate. Typically, the keys in MultiGet will not be duplicates, but its good to handle that case correctly

Test -
asan_crash
make check
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5292

Differential Revision: D15282530

Pulled By: anand1976

fbshipit-source-id: d1a6a86e0af273169c3632db22a44d79c66a581f
db/version_set.cc