Add function to set row cache on rocksdb_options_t (#6442)
Summary: Adding a C API function to set `row_cache` on `rocksdb_options_t` as this functionality is missing. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6442 Differential Revision: D20036813 Pulled By: riversand963 fbshipit-source-id: c1fa95ea343345fbc1e57961d0d048e0e79be373
This commit is contained in:
parent
d75ce0a8ae
commit
fcec56e86c
6
db/c.cc
6
db/c.cc
@ -2765,6 +2765,12 @@ void rocksdb_ratelimiter_destroy(rocksdb_ratelimiter_t *limiter) {
|
|||||||
delete limiter;
|
delete limiter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rocksdb_options_set_row_cache(rocksdb_options_t* opt, rocksdb_cache_t* cache) {
|
||||||
|
if(cache) {
|
||||||
|
opt->rep.row_cache = cache->rep;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void rocksdb_set_perf_level(int v) {
|
void rocksdb_set_perf_level(int v) {
|
||||||
PerfLevel level = static_cast<PerfLevel>(v);
|
PerfLevel level = static_cast<PerfLevel>(v);
|
||||||
SetPerfLevel(level);
|
SetPerfLevel(level);
|
||||||
|
@ -1047,6 +1047,10 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_ratelimiter(
|
|||||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_atomic_flush(
|
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_atomic_flush(
|
||||||
rocksdb_options_t* opt, unsigned char);
|
rocksdb_options_t* opt, unsigned char);
|
||||||
|
|
||||||
|
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_row_cache(
|
||||||
|
rocksdb_options_t* opt, rocksdb_cache_t* cache
|
||||||
|
);
|
||||||
|
|
||||||
/* RateLimiter */
|
/* RateLimiter */
|
||||||
extern ROCKSDB_LIBRARY_API rocksdb_ratelimiter_t* rocksdb_ratelimiter_create(
|
extern ROCKSDB_LIBRARY_API rocksdb_ratelimiter_t* rocksdb_ratelimiter_create(
|
||||||
int64_t rate_bytes_per_sec, int64_t refill_period_us, int32_t fairness);
|
int64_t rate_bytes_per_sec, int64_t refill_period_us, int32_t fairness);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user