Status s;
MergeContext merge_context;
const ImmutableDBOptions& immuable_db_options =
- static_cast_with_check<DBImpl, DB>(db->GetRootDB())
- ->immutable_db_options();
+ static_cast_with_check<DBImpl>(db->GetRootDB())->immutable_db_options();
// Since the lifetime of the WriteBatch is the same as that of the transaction
// we cannot pin it as otherwise the returned value will not be available
get_impl_options.column_family = column_family;
get_impl_options.value = pinnable_val;
get_impl_options.callback = callback;
- s = static_cast_with_check<DBImpl, DB>(db->GetRootDB())
+ s = static_cast_with_check<DBImpl>(db->GetRootDB())
->GetImpl(read_options, key, get_impl_options);
}
if (s.ok() || s.IsNotFound()) { // DB Get Succeeded
if (result == WriteBatchWithIndexInternal::Result::kMergeInProgress) {
// Merge result from DB with merges in Batch
- auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
+ auto cfh = static_cast_with_check<ColumnFamilyHandleImpl>(column_family);
const MergeOperator* merge_operator =
cfh->cfd()->ioptions()->merge_operator;
Statistics* statistics = immuable_db_options.statistics.get();
const size_t num_keys, const Slice* keys, PinnableSlice* values,
Status* statuses, bool sorted_input, ReadCallback* callback) {
const ImmutableDBOptions& immuable_db_options =
- static_cast_with_check<DBImpl, DB>(db->GetRootDB())
- ->immutable_db_options();
+ static_cast_with_check<DBImpl>(db->GetRootDB())->immutable_db_options();
autovector<KeyContext, MultiGetContext::MAX_BATCH_SIZE> key_context;
autovector<KeyContext*, MultiGetContext::MAX_BATCH_SIZE> sorted_keys;
assert(result == WriteBatchWithIndexInternal::Result::kMergeInProgress ||
result == WriteBatchWithIndexInternal::Result::kNotFound);
- key_context.emplace_back(column_family, keys[i], &values[i], &statuses[i]);
+ key_context.emplace_back(column_family, keys[i], &values[i],
+ /*timestamp*/ nullptr, &statuses[i]);
merges.emplace_back(result, std::move(merge_context));
}
}
// Did not find key in batch OR could not resolve Merges. Try DB.
- static_cast_with_check<DBImpl, DB>(db->GetRootDB())
+ static_cast_with_check<DBImpl>(db->GetRootDB())
->PrepareMultiGetKeys(key_context.size(), sorted_input, &sorted_keys);
- static_cast_with_check<DBImpl, DB>(db->GetRootDB())
+ static_cast_with_check<DBImpl>(db->GetRootDB())
->MultiGetWithCallback(read_options, column_family, callback,
&sorted_keys);
ColumnFamilyHandleImpl* cfh =
- reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
+ static_cast_with_check<ColumnFamilyHandleImpl>(column_family);
const MergeOperator* merge_operator = cfh->cfd()->ioptions()->merge_operator;
for (auto iter = key_context.begin(); iter != key_context.end(); ++iter) {
KeyContext& key = *iter;