add frontend threadpool to database
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
94d7b21cf0
commit
c7ae951676
10 changed files with 362 additions and 57 deletions
|
@ -27,7 +27,7 @@ use std::{
|
|||
};
|
||||
|
||||
use conduit::Result;
|
||||
use rocksdb::{AsColumnFamilyRef, ColumnFamily, ReadOptions, WriteOptions};
|
||||
use rocksdb::{AsColumnFamilyRef, ColumnFamily, ReadOptions, ReadTier, WriteOptions};
|
||||
|
||||
use crate::{watchers::Watchers, Engine};
|
||||
|
||||
|
@ -38,6 +38,7 @@ pub struct Map {
|
|||
watchers: Watchers,
|
||||
write_options: WriteOptions,
|
||||
read_options: ReadOptions,
|
||||
cache_read_options: ReadOptions,
|
||||
}
|
||||
|
||||
impl Map {
|
||||
|
@ -49,6 +50,7 @@ impl Map {
|
|||
watchers: Watchers::default(),
|
||||
write_options: write_options_default(),
|
||||
read_options: read_options_default(),
|
||||
cache_read_options: cache_read_options_default(),
|
||||
}))
|
||||
}
|
||||
|
||||
|
@ -112,6 +114,13 @@ fn open(db: &Arc<Engine>, name: &str) -> Result<Arc<ColumnFamily>> {
|
|||
})
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn cache_read_options_default() -> ReadOptions {
|
||||
let mut read_options = read_options_default();
|
||||
read_options.set_read_tier(ReadTier::BlockCache);
|
||||
read_options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn read_options_default() -> ReadOptions {
|
||||
let mut read_options = ReadOptions::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue