/usr/include/rocksdb/utilities/debug.h is in librocksdb-dev 5.8.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | // Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
#ifndef ROCKSDB_LITE
#include "rocksdb/db.h"
#include "rocksdb/types.h"
namespace rocksdb {
// Data associated with a particular version of a key. A database may internally
// store multiple versions of a same user key due to snapshots, compaction not
// happening yet, etc.
struct KeyVersion {
KeyVersion() : user_key(""), value(""), sequence(0), type(0) {}
KeyVersion(const std::string& _user_key, const std::string& _value,
SequenceNumber _sequence, int _type)
: user_key(_user_key), value(_value), sequence(_sequence), type(_type) {}
std::string user_key;
std::string value;
SequenceNumber sequence;
// TODO(ajkr): we should provide a helper function that converts the int to a
// string describing the type for easier debugging.
int type;
};
// Returns listing of all versions of keys in the provided user key range.
// The range is inclusive-inclusive, i.e., [`begin_key`, `end_key`].
// The result is inserted into the provided vector, `key_versions`.
Status GetAllKeyVersions(DB* db, Slice begin_key, Slice end_key,
std::vector<KeyVersion>* key_versions);
} // namespace rocksdb
#endif // ROCKSDB_LITE
|