@ -94,8 +94,6 @@ class MultiGetContext {
: num_keys_ ( num_keys ) ,
: num_keys_ ( num_keys ) ,
value_mask_ ( 0 ) ,
value_mask_ ( 0 ) ,
lookup_key_ptr_ ( reinterpret_cast < LookupKey * > ( lookup_key_stack_buf ) ) {
lookup_key_ptr_ ( reinterpret_cast < LookupKey * > ( lookup_key_stack_buf ) ) {
int index = 0 ;
if ( num_keys > MAX_LOOKUP_KEYS_ON_STACK ) {
if ( num_keys > MAX_LOOKUP_KEYS_ON_STACK ) {
lookup_key_heap_buf . reset ( new char [ sizeof ( LookupKey ) * num_keys ] ) ;
lookup_key_heap_buf . reset ( new char [ sizeof ( LookupKey ) * num_keys ] ) ;
lookup_key_ptr_ = reinterpret_cast < LookupKey * > (
lookup_key_ptr_ = reinterpret_cast < LookupKey * > (
@ -105,11 +103,10 @@ class MultiGetContext {
for ( size_t iter = 0 ; iter ! = num_keys_ ; + + iter ) {
for ( size_t iter = 0 ; iter ! = num_keys_ ; + + iter ) {
// autovector may not be contiguous storage, so make a copy
// autovector may not be contiguous storage, so make a copy
sorted_keys_ [ iter ] = ( * sorted_keys ) [ begin + iter ] ;
sorted_keys_ [ iter ] = ( * sorted_keys ) [ begin + iter ] ;
sorted_keys_ [ iter ] - > lkey = new ( & lookup_key_ptr_ [ index ] )
sorted_keys_ [ iter ] - > lkey = new ( & lookup_key_ptr_ [ iter ] )
LookupKey ( * sorted_keys_ [ iter ] - > key , snapshot ) ;
LookupKey ( * sorted_keys_ [ iter ] - > key , snapshot ) ;
sorted_keys_ [ iter ] - > ukey = sorted_keys_ [ iter ] - > lkey - > user_key ( ) ;
sorted_keys_ [ iter ] - > ukey = sorted_keys_ [ iter ] - > lkey - > user_key ( ) ;
sorted_keys_ [ iter ] - > ikey = sorted_keys_ [ iter ] - > lkey - > internal_key ( ) ;
sorted_keys_ [ iter ] - > ikey = sorted_keys_ [ iter ] - > lkey - > internal_key ( ) ;
index + + ;
}
}
}
}