mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
sstables: print sstable path in case of an exception
Without that, we don't know where to look for the problems
Before:
compaction failed: sstables::malformed_sstable_exception (Too big ttl: 3163676957)
After:
compaction_manager - compaction failed: sstables::malformed_sstable_exception (Too big ttl: 4294967295 in sstable /var/lib/scylla/data/system_traces/events-8826e8e9e16a372887533bc1fc713c25/mc-832-big-Data.db)
Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20181016181004.17838-1-glauber@scylladb.com>
(cherry picked from commit 7edae5421d)
This commit is contained in:
committed by
Avi Kivity
parent
0fee1d9e43
commit
28fa66591a
@@ -241,6 +241,7 @@ private:
|
||||
} _state = state::ROW_START;
|
||||
|
||||
row_consumer& _consumer;
|
||||
shared_sstable _sst;
|
||||
|
||||
temporary_buffer<char> _key;
|
||||
temporary_buffer<char> _val;
|
||||
@@ -270,6 +271,14 @@ public:
|
||||
// leave only the unprocessed part. The caller must handle calling
|
||||
// process() again, and/or refilling the buffer, as needed.
|
||||
data_consumer::processing_result process_state(temporary_buffer<char>& data) {
|
||||
try {
|
||||
return do_process_state(data);
|
||||
} catch (malformed_sstable_exception& exp) {
|
||||
throw malformed_sstable_exception(exp.what(), _sst->get_filename());
|
||||
}
|
||||
}
|
||||
private:
|
||||
data_consumer::processing_result do_process_state(temporary_buffer<char>& data) {
|
||||
#if 0
|
||||
// Testing hack: call process() for tiny chunks separately, to verify
|
||||
// that primitive types crossing input buffer are handled correctly.
|
||||
@@ -508,13 +517,15 @@ public:
|
||||
|
||||
return row_consumer::proceed::yes;
|
||||
}
|
||||
public:
|
||||
|
||||
data_consume_rows_context(const schema&,
|
||||
const shared_sstable&,
|
||||
const shared_sstable& sst,
|
||||
row_consumer& consumer,
|
||||
input_stream<char>&& input, uint64_t start, uint64_t maxlen)
|
||||
: continuous_data_consumer(std::move(input), start, maxlen)
|
||||
, _consumer(consumer) {
|
||||
, _consumer(consumer)
|
||||
, _sst(sst) {
|
||||
}
|
||||
|
||||
void verify_end_state() {
|
||||
@@ -610,6 +621,7 @@ private:
|
||||
} _state = state::PARTITION_START;
|
||||
|
||||
consumer_m& _consumer;
|
||||
shared_sstable _sst;
|
||||
const serialization_header& _header;
|
||||
column_translation _column_translation;
|
||||
|
||||
@@ -753,6 +765,14 @@ public:
|
||||
}
|
||||
|
||||
data_consumer::processing_result process_state(temporary_buffer<char>& data) {
|
||||
try {
|
||||
return do_process_state(data);
|
||||
} catch (malformed_sstable_exception& exp) {
|
||||
throw malformed_sstable_exception(exp.what(), _sst->get_filename());
|
||||
}
|
||||
}
|
||||
private:
|
||||
data_consumer::processing_result do_process_state(temporary_buffer<char>& data) {
|
||||
switch (_state) {
|
||||
case state::PARTITION_START:
|
||||
partition_start_label:
|
||||
@@ -1277,6 +1297,7 @@ public:
|
||||
|
||||
return row_consumer::proceed::yes;
|
||||
}
|
||||
public:
|
||||
|
||||
data_consume_rows_context_m(const schema& s,
|
||||
const shared_sstable& sst,
|
||||
@@ -1286,6 +1307,7 @@ public:
|
||||
uint64_t maxlen)
|
||||
: continuous_data_consumer(std::move(input), start, maxlen)
|
||||
, _consumer(consumer)
|
||||
, _sst(sst)
|
||||
, _header(sst->get_serialization_header())
|
||||
, _column_translation(sst->get_column_translation(s, _header))
|
||||
, _liveness(_header)
|
||||
|
||||
Reference in New Issue
Block a user