rocksdb/db/db_impl
Peter Dillinger 1d34cd797e Fix insecure internal API for GetImpl (#8590)
Summary:
Calling the GetImpl function could leave reference to a local
callback function in a field of a parameter struct. As this is
performance-critical code, I'm not going to attempt to sanitize this
code too much, but make the existing hack a bit cleaner by reverting
what it overwrites in the input struct.

Added SaveAndRestore utility class to make that easier.

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

Test Plan:
added unit test for SaveAndRestore; existing tests for
GetImpl

Reviewed By: riversand963

Differential Revision: D29947983

Pulled By: pdillinger

fbshipit-source-id: 2f608853f970bc06724e834cc84dcc4b8599ddeb
2021-07-29 17:23:01 -07:00
..
compacted_db_impl.cc Make backups openable as read-only DBs (#8142) 2021-04-06 14:37:53 -07:00
compacted_db_impl.h Move compacted_db_impl.[c|h] to db/db_impl (#8082) 2021-03-23 13:49:26 -07:00
db_impl_compaction_flush.cc Remove TaskLimiterToken::ReleaseOnce for fix (#8567) 2021-07-21 17:37:53 -07:00
db_impl_debug.cc Eliminate compiler complaining, which the return type of the function… (#8498) 2021-07-08 10:09:05 -07:00
db_impl_experimental.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl_files.cc DB::GetSortedWalFiles() to ensure file deletion is disabled (#8591) 2021-07-29 11:51:08 -07:00
db_impl_open.cc Retire superfluous functions introduced in earlier mempurge PRs. (#8558) 2021-07-22 18:29:13 -07:00
db_impl_readonly.cc Make backups openable as read-only DBs (#8142) 2021-04-06 14:37:53 -07:00
db_impl_readonly.h RocksJava - Add errorIfLogFileExists parameter to RocksDB.openReadOnly (#7046) 2020-09-17 15:41:25 -07:00
db_impl_secondary.cc Retire superfluous functions introduced in earlier mempurge PRs. (#8558) 2021-07-22 18:29:13 -07:00
db_impl_secondary.h Implement missing Handler methods in ColumnFamilyCollector. (#8456) 2021-07-12 09:23:45 -07:00
db_impl_write.cc Retire superfluous functions introduced in earlier mempurge PRs. (#8558) 2021-07-22 18:29:13 -07:00
db_impl.cc Fix insecure internal API for GetImpl (#8590) 2021-07-29 17:23:01 -07:00
db_impl.h Delete legacy code not used any more. (#8508) 2021-07-14 16:04:56 -07:00