diff --git a/db/memtable.cc b/db/memtable.cc index 32f8977df..f349140ef 100644 --- a/db/memtable.cc +++ b/db/memtable.cc @@ -766,7 +766,13 @@ static bool SaveValue(void* arg, const char* entry) { } return true; } - default: + default: { + std::string msg("Unrecognized value type: " + + std::to_string(static_cast(type)) + ". "); + msg.append("User key: " + user_key_slice.ToString(/*hex=*/true) + ". "); + msg.append("seq: " + std::to_string(seq) + "."); + *(s->status) = Status::Corruption(msg.c_str()); + } assert(false); return true; }