@ -1686,7 +1686,7 @@ Status DBImpl::RunManualCompaction(ColumnFamilyData* cfd, int input_level,
cfd - > ioptions ( ) - > compaction_style = = kCompactionStyleFIFO ) {
cfd - > ioptions ( ) - > compaction_style = = kCompactionStyleFIFO ) {
manual . begin = nullptr ;
manual . begin = nullptr ;
} else {
} else {
begin_storage = Internal Key ( * begin , kMaxSequenceNumber , kValueTypeForSeek ) ;
begin_storage . SetMaxPossibleForUser Key( * begin ) ;
manual . begin = & begin_storage ;
manual . begin = & begin_storage ;
}
}
if ( end = = nullptr | |
if ( end = = nullptr | |
@ -1694,7 +1694,7 @@ Status DBImpl::RunManualCompaction(ColumnFamilyData* cfd, int input_level,
cfd - > ioptions ( ) - > compaction_style = = kCompactionStyleFIFO ) {
cfd - > ioptions ( ) - > compaction_style = = kCompactionStyleFIFO ) {
manual . end = nullptr ;
manual . end = nullptr ;
} else {
} else {
end_storage = Internal Key ( * end , 0 , static_cast < ValueType > ( 0 ) ) ;
end_storage . SetMinPossibleForUser Key( * end ) ;
manual . end = & end_storage ;
manual . end = & end_storage ;
}
}
@ -3555,8 +3555,9 @@ void DBImpl::GetApproximateSizes(ColumnFamilyHandle* column_family,
for ( int i = 0 ; i < n ; i + + ) {
for ( int i = 0 ; i < n ; i + + ) {
// Convert user_key into a corresponding internal key.
// Convert user_key into a corresponding internal key.
InternalKey k1 ( range [ i ] . start , kMaxSequenceNumber , kValueTypeForSeek ) ;
InternalKey k1 , k2 ;
InternalKey k2 ( range [ i ] . limit , kMaxSequenceNumber , kValueTypeForSeek ) ;
k1 . SetMaxPossibleForUserKey ( range [ i ] . start ) ;
k2 . SetMaxPossibleForUserKey ( range [ i ] . limit ) ;
uint64_t start = versions_ - > ApproximateOffsetOf ( v , k1 ) ;
uint64_t start = versions_ - > ApproximateOffsetOf ( v , k1 ) ;
uint64_t limit = versions_ - > ApproximateOffsetOf ( v , k2 ) ;
uint64_t limit = versions_ - > ApproximateOffsetOf ( v , k2 ) ;
sizes [ i ] = ( limit > = start ? limit - start : 0 ) ;
sizes [ i ] = ( limit > = start ? limit - start : 0 ) ;