Tomislav Novak
ec70fea4c4
Fix a comparison in DBIter::FindPrevUserKey()
...
Summary:
When seek target is a merge key (`kTypeMerge`), `DBIter::FindNextUserEntry()`
advances the underlying iterator _past_ the current key (`saved_key_`); see
`MergeValuesNewToOld()`. However, `FindPrevUserKey()` assumes that `iter_`
points to an entry with the same user key as `saved_key_`. As a result,
`it->Seek(key) && it->Prev()` can cause the iterator to be positioned at the
_next_, instead of the previous, entry (new test, written by @lovro, reproduces
the bug).
This diff changes `FindPrevUserKey()` to also skip keys that are _greater_ than
`saved_key_`.
Test Plan: db_test
Reviewers: igor, sdong
Reviewed By: sdong
Subscribers: leveldb, dhruba, lovro
Differential Revision: https://reviews.facebook.net/D40791
2015-06-29 17:04:03 -07:00
..
2015-06-05 20:18:21 -07:00
2015-05-12 15:53:55 -07:00
2015-06-17 10:54:51 -07:00
2015-06-17 14:36:14 -07:00
2015-06-29 14:39:01 -07:00
2015-06-18 14:55:05 -07:00
2015-06-18 14:55:05 -07:00
2015-06-09 16:36:07 -07:00
2015-06-18 11:03:31 -07:00
2015-06-05 20:18:21 -07:00
2015-06-17 23:40:34 -07:00
2015-06-17 23:40:34 -07:00
2015-06-04 16:51:25 -07:00
2015-06-11 15:42:16 -07:00
2015-05-05 09:57:47 -07:00
2015-06-08 16:34:26 -07:00
2015-06-04 16:51:25 -07:00
2015-06-09 16:36:07 -07:00
2015-04-25 18:14:27 +09:00
2015-06-04 16:51:25 -07:00
2015-06-23 10:25:45 -07:00
2015-06-19 16:08:31 -07:00
2015-06-04 16:51:25 -07:00
2015-06-17 12:37:59 -07:00
2014-12-22 12:20:17 -08:00
2015-06-17 14:36:14 -07:00
2015-06-25 14:43:25 -07:00
2015-06-17 14:36:14 -07:00
2015-06-29 17:04:03 -07:00
2015-06-29 17:04:03 -07:00
2014-09-08 15:04:34 -07:00
2015-06-29 17:04:03 -07:00
2015-03-17 14:08:00 -07:00
2015-06-17 20:44:26 -07:00
2015-05-29 14:36:35 -07:00
2015-06-17 14:36:14 -07:00
2015-06-03 19:57:01 -07:00
2015-06-03 19:57:01 -07:00
2015-04-23 12:10:36 -07:00
2015-06-17 14:36:14 -07:00
2015-04-29 10:52:31 -07:00
2015-04-29 10:52:31 -07:00
2014-11-11 16:47:22 -05:00
2015-03-17 14:08:00 -07:00
2015-01-22 14:32:03 -08:00
2015-01-22 14:32:03 -08:00
2015-05-29 14:36:35 -07:00
2015-06-11 15:22:22 -07:00
2015-06-11 15:22:22 -07:00
2014-10-02 14:33:16 -07:00
2015-01-26 11:48:07 -08:00
2015-02-26 11:28:41 -08:00
2015-02-26 11:28:41 -08:00
2015-06-17 23:40:34 -07:00
2015-06-17 23:40:34 -07:00
2015-03-30 15:04:10 -04:00
2015-06-17 14:36:14 -07:00
2014-01-02 16:32:31 -08:00
2015-06-22 15:28:12 -07:00
2015-06-22 15:28:12 -07:00
2015-06-22 15:28:12 -07:00
2015-05-19 10:59:30 -07:00
2015-04-07 16:25:56 -07:00
2015-02-24 16:24:53 -08:00
2015-04-09 21:05:18 -07:00
2014-12-02 12:09:20 -08:00
2014-12-02 12:09:20 -08:00
2015-06-11 20:42:18 -07:00
2015-06-16 18:13:23 -07:00
2015-06-16 18:13:23 -07:00
2015-06-16 18:13:23 -07:00
2015-06-16 18:13:23 -07:00
2015-05-02 13:19:10 -07:00
2015-05-11 14:51:51 -07:00
2015-06-26 11:35:46 -07:00
2015-04-27 20:23:50 -07:00
2015-06-26 11:35:46 -07:00
2015-06-26 11:35:46 -07:00
2015-03-30 16:05:35 -04:00
2015-03-19 17:29:37 -07:00
2015-03-19 17:29:37 -07:00
2015-06-05 20:18:21 -07:00
2015-03-17 14:08:00 -07:00
2015-06-16 18:13:23 -07:00
2015-03-17 19:23:08 -07:00
2015-06-08 21:57:02 -07:00
2015-06-23 10:25:45 -07:00
2015-06-23 10:25:45 -07:00
2015-06-24 01:38:53 -07:00
2015-04-06 10:27:21 -07:00
2015-06-05 20:18:21 -07:00
2014-11-06 11:14:28 -08:00
2015-02-26 11:28:41 -08:00
2015-06-05 20:18:21 -07:00
2015-02-06 08:44:30 -08:00
2014-10-31 16:34:38 -07:00
2015-06-05 20:18:21 -07:00
2014-10-31 11:59:54 -07:00
2015-06-05 20:18:21 -07:00
2015-04-03 09:04:35 -07:00
2015-06-11 20:42:18 -07:00
2015-06-04 16:51:25 -07:00
2015-04-13 16:15:05 -07:00
2015-02-26 11:28:41 -08:00
2014-11-10 17:39:38 -05:00
2015-05-29 04:30:03 -07:00
2015-05-29 04:30:03 -07:00
2015-05-29 14:36:35 -07:00
2015-05-29 04:30:03 -07:00
2015-05-29 14:36:35 -07:00
2015-05-29 14:36:35 -07:00
2015-06-11 20:42:18 -07:00
2015-06-11 20:42:18 -07:00
2015-06-11 20:42:18 -07:00
2015-06-11 20:42:18 -07:00
2015-06-11 20:42:18 -07:00
2014-12-02 12:09:20 -08:00