rocksdb/db/db_impl
Changyu Bi 749b849a34 Fix memtable-only iterator regression (#10705)
Summary:
when there is a single memtable without range tombstones and no SST files in the database, DBIter should wrap memtable iterator directly. Currently we create a merging iterator on top of the memtable iterator, and have DBIter wrap around it. This causes iterator regression and this PR fixes this issue.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10705

Test Plan:
- `make check`
- Performance:
  - Set up: `./db_bench -benchmarks=filluniquerandom -write_buffer_size=$((1 << 30)) -num=10000`
  - Benchmark: `./db_bench -benchmarks=seekrandom -use_existing_db=true -avoid_flush_during_recovery=true -write_buffer_size=$((1 << 30)) -num=10000 -threads=16 -duration=60 -seek_nexts=$seek_nexts`
```
seek_nexts    main op/sec    https://github.com/facebook/rocksdb/issues/10705      RocksDB v7.6
0             5746568        5749033     5786180
30            2411690        3006466     2837699
1000          102556         128902      124667
```

Reviewed By: ajkr

Differential Revision: D39644221

Pulled By: cbi42

fbshipit-source-id: 8063ff611ba31b0e5670041da3927c8c54b2097d
2022-09-21 09:49:31 -07:00
..
compacted_db_impl.cc Fix periodic_task unable to re-register the same task type (#10379) 2022-08-25 18:52:37 -07:00
compacted_db_impl.h Don't wait for indirect flush in read-only DB (#10569) 2022-08-29 13:36:23 -07:00
db_impl.cc Fix memtable-only iterator regression (#10705) 2022-09-21 09:49:31 -07:00
db_impl.h Always verify SST unique IDs on SST file open (#10532) 2022-09-07 22:52:42 -07:00
db_impl_compaction_flush.cc Sync dir containing CURRENT after RenameFile on CURRENT as much as possible (#10573) 2022-08-29 17:35:21 -07:00
db_impl_debug.cc Fix periodic_task unable to re-register the same task type (#10379) 2022-08-25 18:52:37 -07:00
db_impl_experimental.cc Remove unused fields from FileMetaData (temporarily) (#10443) 2022-08-01 17:56:13 -07:00
db_impl_files.cc Do not hold mutex when write keys if not necessary (#7516) 2022-07-21 13:35:36 -07:00
db_impl_open.cc Always verify SST unique IDs on SST file open (#10532) 2022-09-07 22:52:42 -07:00
db_impl_readonly.cc Skip swaths of range tombstone covered keys in merging iterator (2022 edition) (#10449) 2022-09-02 09:51:19 -07:00
db_impl_readonly.h Don't wait for indirect flush in read-only DB (#10569) 2022-08-29 13:36:23 -07:00
db_impl_secondary.cc Skip swaths of range tombstone covered keys in merging iterator (2022 edition) (#10449) 2022-09-02 09:51:19 -07:00
db_impl_secondary.h Don't wait for indirect flush in read-only DB (#10569) 2022-08-29 13:36:23 -07:00
db_impl_write.cc Sync dir containing CURRENT after RenameFile on CURRENT as much as possible (#10573) 2022-08-29 17:35:21 -07:00