diff --git a/db/memtable.cc b/db/memtable.cc index fe627eaec..b391fe561 100644 --- a/db/memtable.cc +++ b/db/memtable.cc @@ -767,7 +767,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; }