@ -60,12 +60,9 @@ struct CompressionOptions {
int window_bits ;
int window_bits ;
int level ;
int level ;
int strategy ;
int strategy ;
CompressionOptions ( ) : window_bits ( - 14 ) ,
CompressionOptions ( ) : window_bits ( - 14 ) , level ( - 1 ) , strategy ( 0 ) { }
level ( - 1 ) ,
CompressionOptions ( int wbits , int lev , int strategy )
strategy ( 0 ) { }
: window_bits ( wbits ) , level ( lev ) , strategy ( strategy ) { }
CompressionOptions ( int wbits , int lev , int strategy ) : window_bits ( wbits ) ,
level ( lev ) ,
strategy ( strategy ) { }
} ;
} ;
// Options to control the behavior of a database (passed to DB::Open)
// Options to control the behavior of a database (passed to DB::Open)
@ -216,7 +213,6 @@ struct Options {
// Default: 16
// Default: 16
int block_restart_interval ;
int block_restart_interval ;
// Compress blocks using the specified compression algorithm. This
// Compress blocks using the specified compression algorithm. This
// parameter can be changed dynamically.
// parameter can be changed dynamically.
//
//
@ -326,7 +322,6 @@ struct Options {
// will be 20MB, total file size for level-2 will be 200MB,
// will be 20MB, total file size for level-2 will be 200MB,
// and total file size for level-3 will be 2GB.
// and total file size for level-3 will be 2GB.
// by default 'max_bytes_for_level_base' is 10MB.
// by default 'max_bytes_for_level_base' is 10MB.
uint64_t max_bytes_for_level_base ;
uint64_t max_bytes_for_level_base ;
// by default 'max_bytes_for_level_base' is 10.
// by default 'max_bytes_for_level_base' is 10.
@ -484,10 +479,19 @@ struct Options {
// order.
// order.
int table_cache_remove_scan_count_limit ;
int table_cache_remove_scan_count_limit ;
// size of one block in arena memory allocation.
// Size of one block in arena memory allocation.
// If <= 0, a proper value is automatically calculated (usually 1/10 of
//
// If <= 0, a proper value is automatically calculated (usually about 1/10 of
// writer_buffer_size).
// writer_buffer_size).
//
//
// There are two additonal restriction of the The specified size:
// (1) size should be in the range of [4096, 2 << 30] and
// (2) be the multiple of the CPU word (which helps with the memory
// alignment).
//
// We'll automatically check and adjust the size number to make sure it
// conforms to the restrictions.
//
// Default: 0
// Default: 0
size_t arena_block_size ;
size_t arena_block_size ;
@ -572,7 +576,12 @@ struct Options {
// Specify the file access pattern once a compaction is started.
// Specify the file access pattern once a compaction is started.
// It will be applied to all input files of a compaction.
// It will be applied to all input files of a compaction.
// Default: NORMAL
// Default: NORMAL
enum { NONE , NORMAL , SEQUENTIAL , WILLNEED } access_hint_on_compaction_start ;
enum {
NONE ,
NORMAL ,
SEQUENTIAL ,
WILLNEED
} access_hint_on_compaction_start ;
// Use adaptive mutex, which spins in the user space before resorting
// Use adaptive mutex, which spins in the user space before resorting
// to kernel. This could reduce context switch when the mutex is not
// to kernel. This could reduce context switch when the mutex is not
@ -697,13 +706,14 @@ struct ReadOptions {
prefix_seek ( false ) ,
prefix_seek ( false ) ,
snapshot ( nullptr ) ,
snapshot ( nullptr ) ,
prefix ( nullptr ) ,
prefix ( nullptr ) ,
read_tier ( kReadAllTier ) {
read_tier ( kReadAllTier ) { }
}
ReadOptions ( bool cksum , bool cache )
ReadOptions ( bool cksum , bool cache ) :
: verify_checksums ( cksum ) ,
verify_checksums ( cksum ) , fill_cache ( cache ) ,
fill_cache ( cache ) ,
prefix_seek ( false ) , snapshot ( nullptr ) , prefix ( nullptr ) ,
prefix_seek ( false ) ,
read_tier ( kReadAllTier ) {
snapshot ( nullptr ) ,
}
prefix ( nullptr ) ,
read_tier ( kReadAllTier ) { }
} ;
} ;
// Options that control write operations
// Options that control write operations
@ -730,10 +740,7 @@ struct WriteOptions {
// and the write may got lost after a crash.
// and the write may got lost after a crash.
bool disableWAL ;
bool disableWAL ;
WriteOptions ( )
WriteOptions ( ) : sync ( false ) , disableWAL ( false ) { }
: sync ( false ) ,
disableWAL ( false ) {
}
} ;
} ;
// Options that control flush operations
// Options that control flush operations
@ -742,9 +749,7 @@ struct FlushOptions {
// Default: true
// Default: true
bool wait ;
bool wait ;
FlushOptions ( )
FlushOptions ( ) : wait ( true ) { }
: wait ( true ) {
}
} ;
} ;
} // namespace rocksdb
} // namespace rocksdb