From 21c047ab4920136e2a921e935bbe6632703b5877 Mon Sep 17 00:00:00 2001 From: siddontang Date: Thu, 2 Jun 2016 01:48:50 +0800 Subject: [PATCH] add readahead size option (#1146) --- db/c.cc | 5 +++++ include/rocksdb/c.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/db/c.cc b/db/c.cc index d853ce907..3c3178ec2 100644 --- a/db/c.cc +++ b/db/c.cc @@ -2127,6 +2127,11 @@ void rocksdb_readoptions_set_tailing( opt->rep.tailing = v; } +void rocksdb_readoptions_set_readahead_size( + rocksdb_readoptions_t* opt, size_t v) { + opt->rep.readahead_size = v; +} + rocksdb_writeoptions_t* rocksdb_writeoptions_create() { return new rocksdb_writeoptions_t; } diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index 1374ff0a9..0e7ae0a8c 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -819,6 +819,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_readoptions_set_read_tier( rocksdb_readoptions_t*, int); extern ROCKSDB_LIBRARY_API void rocksdb_readoptions_set_tailing( rocksdb_readoptions_t*, unsigned char); +extern ROCKSDB_LIBRARY_API void rocksdb_readoptions_set_readahead_size( + rocksdb_readoptions_t*, size_t); /* Write options */