sstables: fix probe with Unknown component
Commit 53b7b7def3 ("sstables: handle unrecognized sstable component")
ignores unrecognized components, but misses one code path during probe_file().
Ignore unrecognized components there too.
Fixes #1922.
Message-Id: <20161208131027.28939-1-avi@scylladb.com>
This commit is contained in:
committed by
Tomasz Grabiec
parent
733d87fcc6
commit
872b5ef5f0
@@ -2201,7 +2201,11 @@ sstable::format_types sstable::format_from_sstring(sstring &s) {
|
||||
}
|
||||
|
||||
sstable::component_type sstable::component_from_sstring(sstring &s) {
|
||||
return reverse_map(s, _component_map);
|
||||
try {
|
||||
return reverse_map(s, _component_map);
|
||||
} catch (std::out_of_range&) {
|
||||
return component_type::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
input_stream<char> sstable::data_stream(uint64_t pos, size_t len, const io_priority_class& pc, lw_shared_ptr<file_input_stream_history> history) {
|
||||
|
||||
Reference in New Issue
Block a user