@ -11,14 +11,12 @@
# ifndef __STDC_FORMAT_MACROS
# ifndef __STDC_FORMAT_MACROS
# define __STDC_FORMAT_MACROS
# define __STDC_FORMAT_MACROS
# endif
# endif
# include <inttypes.h>
# include <stdint.h>
# include <stdint.h>
# ifdef OS_SOLARIS
# ifdef OS_SOLARIS
# include <alloca.h>
# include <alloca.h>
# endif
# endif
# include <algorithm>
# include <algorithm>
# include <climits>
# include <cstdio>
# include <cstdio>
# include <map>
# include <map>
# include <set>
# include <set>
@ -63,7 +61,6 @@
# include "options/cf_options.h"
# include "options/cf_options.h"
# include "options/options_helper.h"
# include "options/options_helper.h"
# include "options/options_parser.h"
# include "options/options_parser.h"
# include "port/likely.h"
# include "port/port.h"
# include "port/port.h"
# include "rocksdb/cache.h"
# include "rocksdb/cache.h"
# include "rocksdb/compaction_filter.h"
# include "rocksdb/compaction_filter.h"
@ -74,7 +71,6 @@
# include "rocksdb/statistics.h"
# include "rocksdb/statistics.h"
# include "rocksdb/status.h"
# include "rocksdb/status.h"
# include "rocksdb/table.h"
# include "rocksdb/table.h"
# include "rocksdb/version.h"
# include "rocksdb/write_buffer_manager.h"
# include "rocksdb/write_buffer_manager.h"
# include "table/block.h"
# include "table/block.h"
# include "table/block_based_table_factory.h"
# include "table/block_based_table_factory.h"
@ -909,7 +905,8 @@ Status DBImpl::Get(const ReadOptions& read_options,
Status DBImpl : : GetImpl ( const ReadOptions & read_options ,
Status DBImpl : : GetImpl ( const ReadOptions & read_options ,
ColumnFamilyHandle * column_family , const Slice & key ,
ColumnFamilyHandle * column_family , const Slice & key ,
PinnableSlice * pinnable_val , bool * value_found ) {
PinnableSlice * pinnable_val , bool * value_found ,
ReadCallback * callback ) {
assert ( pinnable_val ! = nullptr ) ;
assert ( pinnable_val ! = nullptr ) ;
StopWatch sw ( env_ , stats_ , DB_GET ) ;
StopWatch sw ( env_ , stats_ , DB_GET ) ;
PERF_TIMER_GUARD ( get_snapshot_time ) ;
PERF_TIMER_GUARD ( get_snapshot_time ) ;
@ -959,13 +956,13 @@ Status DBImpl::GetImpl(const ReadOptions& read_options,
bool done = false ;
bool done = false ;
if ( ! skip_memtable ) {
if ( ! skip_memtable ) {
if ( sv - > mem - > Get ( lkey , pinnable_val - > GetSelf ( ) , & s , & merge_context ,
if ( sv - > mem - > Get ( lkey , pinnable_val - > GetSelf ( ) , & s , & merge_context ,
& range_del_agg , read_options ) ) {
& range_del_agg , read_options , callback ) ) {
done = true ;
done = true ;
pinnable_val - > PinSelf ( ) ;
pinnable_val - > PinSelf ( ) ;
RecordTick ( stats_ , MEMTABLE_HIT ) ;
RecordTick ( stats_ , MEMTABLE_HIT ) ;
} else if ( ( s . ok ( ) | | s . IsMergeInProgress ( ) ) & &
} else if ( ( s . ok ( ) | | s . IsMergeInProgress ( ) ) & &
sv - > imm - > Get ( lkey , pinnable_val - > GetSelf ( ) , & s , & merge_context ,
sv - > imm - > Get ( lkey , pinnable_val - > GetSelf ( ) , & s , & merge_context ,
& range_del_agg , read_options ) ) {
& range_del_agg , read_options , callback ) ) {
done = true ;
done = true ;
pinnable_val - > PinSelf ( ) ;
pinnable_val - > PinSelf ( ) ;
RecordTick ( stats_ , MEMTABLE_HIT ) ;
RecordTick ( stats_ , MEMTABLE_HIT ) ;
@ -977,7 +974,7 @@ Status DBImpl::GetImpl(const ReadOptions& read_options,
if ( ! done ) {
if ( ! done ) {
PERF_TIMER_GUARD ( get_from_output_files_time ) ;
PERF_TIMER_GUARD ( get_from_output_files_time ) ;
sv - > current - > Get ( read_options , lkey , pinnable_val , & s , & merge_context ,
sv - > current - > Get ( read_options , lkey , pinnable_val , & s , & merge_context ,
& range_del_agg , value_found ) ;
& range_del_agg , value_found , nullptr , nullptr , callback ) ;
RecordTick ( stats_ , MEMTABLE_MISS ) ;
RecordTick ( stats_ , MEMTABLE_MISS ) ;
}
}