Add Env::IOPriority to IOOptions (#9806)
Summary: **Context/Todo:** As requested, allow IOOptions to take in an Env::IOPriority for convenience to pass down rate limiter related hint to file system level and for future interaction between RocksDB internal's rate limiting and custom file system level's rate-limiting. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9806 Test Plan: No actual code changes in RocksDB internals Reviewed By: ajkr Differential Revision: D35388966 Pulled By: hx235 fbshipit-source-id: 5891c97c3f9184cd221a9ab8536ce8dfa8526c08
This commit is contained in:
parent
36bc3da97f
commit
9cd47ce554
@ -89,6 +89,12 @@ struct IOOptions {
|
|||||||
// Priority - high or low
|
// Priority - high or low
|
||||||
IOPriority prio;
|
IOPriority prio;
|
||||||
|
|
||||||
|
// Priority used to charge rate limiter configured in file system level (if
|
||||||
|
// any)
|
||||||
|
// Limitation: right now RocksDB internal does not consider this
|
||||||
|
// rate_limiter_priority
|
||||||
|
Env::IOPriority rate_limiter_priority;
|
||||||
|
|
||||||
// Type of data being read/written
|
// Type of data being read/written
|
||||||
IOType type;
|
IOType type;
|
||||||
|
|
||||||
@ -109,6 +115,7 @@ struct IOOptions {
|
|||||||
explicit IOOptions(bool force_dir_fsync_)
|
explicit IOOptions(bool force_dir_fsync_)
|
||||||
: timeout(std::chrono::microseconds::zero()),
|
: timeout(std::chrono::microseconds::zero()),
|
||||||
prio(IOPriority::kIOLow),
|
prio(IOPriority::kIOLow),
|
||||||
|
rate_limiter_priority(Env::IO_TOTAL),
|
||||||
type(IOType::kUnknown),
|
type(IOType::kUnknown),
|
||||||
force_dir_fsync(force_dir_fsync_) {}
|
force_dir_fsync(force_dir_fsync_) {}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user