starrocks/thirdparty/patches/rocksdb-6.22.1-metadata-hea...

85 lines
3.0 KiB
Diff

diff --git a/include/rocksdb/metadata.h b/include/rocksdb/metadata.h
index b515c51..ec2fa46 100644
--- a/include/rocksdb/metadata.h
+++ b/include/rocksdb/metadata.h
@@ -19,39 +19,6 @@ struct ColumnFamilyMetaData;
struct LevelMetaData;
struct SstFileMetaData;
-// The metadata that describes a column family.
-struct ColumnFamilyMetaData {
- ColumnFamilyMetaData() : size(0), file_count(0), name("") {}
- ColumnFamilyMetaData(const std::string& _name, uint64_t _size,
- const std::vector<LevelMetaData>&& _levels)
- : size(_size), name(_name), levels(_levels) {}
-
- // The size of this column family in bytes, which is equal to the sum of
- // the file size of its "levels".
- uint64_t size;
- // The number of files in this column family.
- size_t file_count;
- // The name of the column family.
- std::string name;
- // The metadata of all levels in this column family.
- std::vector<LevelMetaData> levels;
-};
-
-// The metadata that describes a level.
-struct LevelMetaData {
- LevelMetaData(int _level, uint64_t _size,
- const std::vector<SstFileMetaData>&& _files)
- : level(_level), size(_size), files(_files) {}
-
- // The level which this meta data describes.
- const int level;
- // The size of this level in bytes, which is equal to the sum of
- // the file size of its "files".
- const uint64_t size;
- // The metadata of all sst files in this level.
- const std::vector<SstFileMetaData> files;
-};
-
// The metadata that describes a SST file.
struct SstFileMetaData {
SstFileMetaData()
@@ -153,6 +120,39 @@ struct LiveFileMetaData : SstFileMetaData {
LiveFileMetaData() : column_family_name(), level(0) {}
};
+// The metadata that describes a level.
+struct LevelMetaData {
+ LevelMetaData(int _level, uint64_t _size,
+ const std::vector<SstFileMetaData>&& _files)
+ : level(_level), size(_size), files(_files) {}
+
+ // The level which this meta data describes.
+ const int level;
+ // The size of this level in bytes, which is equal to the sum of
+ // the file size of its "files".
+ const uint64_t size;
+ // The metadata of all sst files in this level.
+ const std::vector<SstFileMetaData> files;
+};
+
+// The metadata that describes a column family.
+struct ColumnFamilyMetaData {
+ ColumnFamilyMetaData() : size(0), file_count(0), name("") {}
+ ColumnFamilyMetaData(const std::string& _name, uint64_t _size,
+ const std::vector<LevelMetaData>&& _levels)
+ : size(_size), name(_name), levels(_levels) {}
+
+ // The size of this column family in bytes, which is equal to the sum of
+ // the file size of its "levels".
+ uint64_t size;
+ // The number of files in this column family.
+ size_t file_count;
+ // The name of the column family.
+ std::string name;
+ // The metadata of all levels in this column family.
+ std::vector<LevelMetaData> levels;
+};
+
// Metadata returned as output from ExportColumnFamily() and used as input to
// CreateColumnFamiliesWithImport().
struct ExportImportFilesMetaData {