@ -297,7 +297,7 @@ Status BlockBasedTable::Open(const Options& options, const EnvOptions& soptions,
) ;
if ( s . ok ( ) ) {
assert ( index_block - > compressionT ype ( ) = = kNoCompression ) ;
assert ( index_block - > compression_t ype ( ) = = kNoCompression ) ;
rep - > index_block . reset ( index_block ) ;
// Set filter block
@ -461,7 +461,7 @@ Status BlockBasedTable::GetBlock(
) ;
}
if ( s . ok ( ) ) {
if ( options . fill_cache & & entry - > value - > isC achable( ) ) {
if ( options . fill_cache & & entry - > value - > c achable( ) ) {
entry - > cache_handle = block_cache - > Insert (
key , entry - > value , entry - > value - > size ( ) , & DeleteCachedBlock ) ;
RecordTick ( statistics , BLOCK_CACHE_ADD ) ;
@ -563,7 +563,7 @@ Iterator* BlockBasedTable::BlockReader(void* arg,
// found compressed block
cblock = reinterpret_cast < Block * > ( block_cache_compressed - >
Value ( compressed_cache_handle ) ) ;
assert ( cblock - > compressionT ype ( ) ! = kNoCompression ) ;
assert ( cblock - > compression_t ype ( ) ! = kNoCompression ) ;
// Retrieve the uncompressed contents into a new buffer
BlockContents contents ;
@ -573,8 +573,8 @@ Iterator* BlockBasedTable::BlockReader(void* arg,
// Insert uncompressed block into block cache
if ( s . ok ( ) ) {
block = new Block ( contents ) ; // uncompressed block
assert ( block - > compressionT ype ( ) = = kNoCompression ) ;
if ( block_cache ! = nullptr & & block - > isC achable( ) & &
assert ( block - > compression_t ype ( ) = = kNoCompression ) ;
if ( block_cache ! = nullptr & & block - > c achable( ) & &
options . fill_cache ) {
cache_handle = block_cache - > Insert ( key , block , block - > size ( ) ,
& DeleteCachedBlock ) ;
@ -609,23 +609,23 @@ Iterator* BlockBasedTable::BlockReader(void* arg,
) ;
}
if ( s . ok ( ) ) {
assert ( cblock - > compressionT ype ( ) = = kNoCompression | |
assert ( cblock - > compression_t ype ( ) = = kNoCompression | |
block_cache_compressed ! = nullptr ) ;
// Retrieve the uncompressed contents into a new buffer
BlockContents contents ;
if ( cblock - > compressionT ype ( ) ! = kNoCompression ) {
if ( cblock - > compression_t ype ( ) ! = kNoCompression ) {
s = UncompressBlockContents ( cblock - > data ( ) , cblock - > size ( ) ,
& contents ) ;
}
if ( s . ok ( ) ) {
if ( cblock - > compressionT ype ( ) ! = kNoCompression ) {
if ( cblock - > compression_t ype ( ) ! = kNoCompression ) {
block = new Block ( contents ) ; // uncompressed block
} else {
block = cblock ;
cblock = nullptr ;
}
if ( block - > isC achable( ) & & options . fill_cache ) {
if ( block - > c achable( ) & & options . fill_cache ) {
// Insert compressed block into compressed block cache.
// Release the hold on the compressed cache entry immediately.
if ( block_cache_compressed ! = nullptr & & cblock ! = nullptr ) {
@ -636,7 +636,7 @@ Iterator* BlockBasedTable::BlockReader(void* arg,
cblock = nullptr ;
}
// insert into uncompressed block cache
assert ( ( block - > compressionT ype ( ) = = kNoCompression ) ) ;
assert ( ( block - > compression_t ype ( ) = = kNoCompression ) ) ;
if ( block_cache ! = nullptr ) {
cache_handle = block_cache - > Insert (
key , block , block - > size ( ) , & DeleteCachedBlock ) ;