Skip to content

Commit

Permalink
support lz4 and zstd compression type (OpenAtomFoundation#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
Axlgrep authored and whoiami committed Nov 11, 2019
1 parent b22b056 commit 27f71f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/pika.conf
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ small-compaction-threshold : 5000
max-write-buffer-size : 10737418240
# Limit some command response size, like Scan, Keys*
max-client-response-size : 1073741824
# Compression
# Compression type supported [snappy, zlib, lz4, zstd]
compression : snappy
# max-background-flushes: default is 1, limited in [1, 4]
max-background-flushes : 1
Expand Down
6 changes: 6 additions & 0 deletions src/pika_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,12 @@ void PikaServer::InitBlackwidowOptions() {
} else if (g_pika_conf->compression() == "zlib") {
bw_options_.options.compression =
rocksdb::CompressionType::kZlibCompression;
} else if (g_pika_conf->compression() == "lz4") {
bw_options_.options.compression =
rocksdb::CompressionType::kLZ4Compression;
} else if (g_pika_conf->compression() == "zstd") {
bw_options_.options.compression =
rocksdb::CompressionType::kZSTD;
}

// For rocksdb::BlockBasedTableOptions
Expand Down

0 comments on commit 27f71f7

Please sign in to comment.