Andrew Kryczka
a4a4a2dabd
dedup ReadOptions in iterator hierarchy ( #7210 )
...
Summary:
Previously, a `ReadOptions` object was stored in every `BlockBasedTableIterator`
and every `LevelIterator`. This redundancy consumes extra memory,
resulting in the `Arena` making more allocations, and iteration
observing worse cache performance.
This PR migrates callers of `NewInternalIterator()` and
`MakeInputIterator()` to provide a `ReadOptions` object guaranteed to
outlive the returned iterator. When the iterator's lifetime will be managed by the
user, this lifetime guarantee is achieved by storing the `ReadOptions`
value in `ArenaWrappedDBIter`. Then, sub-iterators of `NewInternalIterator()` and
`MakeInputIterator()` can hold a reference-to-const `ReadOptions`.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7210
Test Plan:
- `make check` under ASAN and valgrind
- benchmark: on a DB with 2 L0 files and 3 L1+ levels, this PR reduced `Arena` allocation 4792 -> 4160 bytes.
Reviewed By: anand1976
Differential Revision: D22861323
Pulled By: ajkr
fbshipit-source-id: 54aebb3e89c872eeab0f5793b4b6e42878d093ce
2020-08-03 15:23:04 -07:00
..
2020-07-22 17:25:20 -07:00
2020-08-03 15:23:04 -07:00
2020-08-03 15:23:04 -07:00
2020-08-03 15:23:04 -07:00
2020-08-03 15:23:04 -07:00
2020-08-03 15:23:04 -07:00
2020-06-17 10:57:40 -07:00
2020-07-28 13:05:34 -07:00
2020-07-29 12:24:13 -07:00
2020-07-20 14:19:48 -07:00
2020-07-22 18:32:52 -07:00
2020-07-22 18:32:52 -07:00
2020-07-02 19:25:41 -07:00
2020-07-02 19:25:41 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-05-12 18:23:33 -07:00
2020-07-22 11:04:40 -07:00
2020-07-02 19:25:41 -07:00
2020-08-03 15:23:04 -07:00
2020-07-09 14:35:17 -07:00
2020-07-02 10:22:43 -07:00
2020-08-03 15:23:04 -07:00
2020-07-24 13:44:49 -07:00
2020-07-09 14:35:17 -07:00
2020-07-02 10:22:43 -07:00
2020-06-24 19:07:08 -07:00
2020-07-09 14:35:17 -07:00
2020-06-15 10:47:02 -07:00
2020-06-15 10:47:02 -07:00
2020-07-02 10:22:43 -07:00
2020-07-09 14:35:17 -07:00
2020-06-24 16:22:49 -07:00
2020-02-20 12:09:57 -08:00
2020-05-28 10:40:03 -07:00
2020-04-10 09:51:58 -07:00
2020-07-09 14:35:17 -07:00
2020-07-02 10:22:43 -07:00
2020-03-20 15:26:10 -07:00
2020-07-02 10:22:43 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-29 13:39:29 -07:00
2020-07-02 10:22:43 -07:00
2020-07-09 14:35:17 -07:00
2020-08-03 15:23:04 -07:00
2020-07-09 14:35:17 -07:00
2020-07-22 13:54:01 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-07-02 10:22:43 -07:00
2020-07-09 14:35:17 -07:00
2020-02-20 12:09:57 -08:00
2020-07-07 17:26:16 -07:00
2020-07-07 17:26:16 -07:00
2020-07-02 10:22:43 -07:00
2020-07-17 23:27:21 -07:00
2020-07-15 11:03:58 -07:00
2020-07-15 11:03:58 -07:00
2020-06-17 10:57:40 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-06-11 14:27:36 -07:00
2020-06-11 14:27:36 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-06-17 10:57:40 -07:00
2020-06-17 10:57:40 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-06-09 16:51:23 -07:00
2020-04-15 17:40:44 -07:00
2020-04-30 08:40:42 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-06-24 19:07:08 -07:00
2020-02-20 12:09:57 -08:00
2020-05-04 15:08:13 -07:00
2020-07-22 08:55:02 -07:00
2020-02-20 12:09:57 -08:00
2020-06-11 18:42:10 -07:00
2020-04-20 11:39:31 -07:00
2020-06-03 15:55:03 -07:00
2020-06-18 10:09:12 -07:00
2020-03-27 16:04:43 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-03-04 20:15:25 -08:00
2020-03-27 16:04:43 -07:00
2020-06-27 08:57:31 -07:00
2020-06-04 15:46:27 -07:00
2020-07-29 09:45:21 -07:00
2020-03-02 16:01:00 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-07-02 10:22:43 -07:00
2020-02-20 12:09:57 -08:00
2020-04-20 13:24:25 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-02-20 12:09:57 -08:00
2020-07-02 19:25:41 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-07-02 10:22:43 -07:00
2020-07-10 13:41:08 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-06-29 14:53:17 -07:00
2020-08-03 15:23:04 -07:00
2020-06-03 15:55:03 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-06-30 15:31:21 -07:00
2020-06-30 15:31:21 -07:00
2020-06-09 16:51:23 -07:00
2020-06-18 10:09:12 -07:00
2020-06-18 10:09:12 -07:00
2020-03-23 10:27:47 -07:00
2020-06-07 21:56:55 -07:00
2020-06-07 21:56:55 -07:00
2020-06-30 15:31:21 -07:00
2020-08-03 15:23:04 -07:00
2020-08-03 15:23:04 -07:00
2020-02-20 12:09:57 -08:00
2020-04-29 13:09:23 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-07-02 19:25:41 -07:00
2020-06-30 12:31:30 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-28 14:14:03 -08:00
2020-02-20 12:09:57 -08:00