Skip to content

Commit

Permalink
compressor: allow an empty map of options
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Dziepak <[email protected]>
  • Loading branch information
pdziepak committed Jun 29, 2015
1 parent b520ef6 commit a0424d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compress.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public:
compression_parameters(const std::map<sstring, sstring>& options) {
validate_options(options);

const auto& compressor_class = options.at(SSTABLE_COMPRESSION);
auto it = options.find(SSTABLE_COMPRESSION);
if (it == options.end()) {
return;
}
const auto& compressor_class = it->second;
if (is_compressor_class(compressor_class, "LZ4Compressor")) {
_compressor = compressor::lz4;
} else if (is_compressor_class(compressor_class, "SnappyCompressor")) {
Expand Down

0 comments on commit a0424d5

Please sign in to comment.