mirror of
https://github.com/facebook/rocksdb.git
synced 2026-07-07 14:47:40 +08:00
Add Temperature to FileAttributes (#12965)
Summary: .. so that appropriate implementations can return temperature information from GetChildrenFileAttributes Pull Request resolved: https://github.com/facebook/rocksdb/pull/12965 Test Plan: just an API placeholder for now Reviewed By: anand1976 Differential Revision: D61748199 Pulled By: pdillinger fbshipit-source-id: b457e324cb451e836611a0bf630c3da0f30a8abf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
96340dbce2
commit
8ac14f525e
@@ -61,18 +61,6 @@ enum CompactionPri : char {
|
||||
kRoundRobin = 0x4,
|
||||
};
|
||||
|
||||
// Temperature of a file. Used to pass to FileSystem for a different
|
||||
// placement and/or coding.
|
||||
// Reserve some numbers in the middle, in case we need to insert new tier
|
||||
// there.
|
||||
enum class Temperature : uint8_t {
|
||||
kUnknown = 0,
|
||||
kHot = 0x04,
|
||||
kWarm = 0x08,
|
||||
kCold = 0x0C,
|
||||
kLastTemperature,
|
||||
};
|
||||
|
||||
struct FileTemperatureAge {
|
||||
Temperature temperature = Temperature::kUnknown;
|
||||
uint64_t age = 0;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "rocksdb/port_defs.h"
|
||||
#include "rocksdb/status.h"
|
||||
#include "rocksdb/thread_status.h"
|
||||
#include "rocksdb/types.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
// Windows API macro interference
|
||||
@@ -159,6 +160,9 @@ class Env : public Customizable {
|
||||
|
||||
// Size of file in bytes
|
||||
uint64_t size_bytes;
|
||||
|
||||
// EXPERIMENTAL - only provided by some implementations
|
||||
Temperature temperature = Temperature::kUnknown;
|
||||
};
|
||||
|
||||
Env();
|
||||
|
||||
@@ -110,4 +110,16 @@ enum class WriteStallCondition {
|
||||
kNormal,
|
||||
};
|
||||
|
||||
// Temperature of a file. Used to pass to FileSystem for a different
|
||||
// placement and/or coding.
|
||||
// Reserve some numbers in the middle, in case we need to insert new tier
|
||||
// there.
|
||||
enum class Temperature : uint8_t {
|
||||
kUnknown = 0,
|
||||
kHot = 0x04,
|
||||
kWarm = 0x08,
|
||||
kCold = 0x0C,
|
||||
kLastTemperature,
|
||||
};
|
||||
|
||||
} // namespace ROCKSDB_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user