Introduce rdb_snapshot_unique_ptr & make rdb_get_rocksdb_db return reference #1509
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a second batch of cleanups from the repeatable read snapshot work.
and callees. Inline this function in ha_rocksdb_proto.h, move rdb declaration
there to support inlining in detail namespace as documentation that it should
not be accessed directly. Update ha_rocksdb.cc itself to use
rdb_get_rocksdb_db instead of rdb. Remove many redudant rdb != nullptr checks
and asserts.
get_rdb_snapshot to manager global RocksDB snapshots
get_rdb_snapshot, instead of receiving one through parameters, simplify its
signature.
acquire_snapshot and move it to the few callers where it may happen.
Add new method Rdb_transaction::has_explicit_or_read_only_snapshot to support
this.
m_auto_incr_map, & m_rollback_only fields private instead of protected. Move
their reset at the end of committed or rolledback transactions to on_finish
method in the base class. Remove redundant m_writes_at_last_savepoint reset in
set_initial_savepoint.