Increase buffer size for erasure meta DB column (#6335)

This commit is contained in:
Pankaj Garg
2019-10-11 12:18:11 -07:00
committed by GitHub
parent 78b2e4df9f
commit 5650231df3

View File

@ -419,11 +419,11 @@ impl std::convert::From<rocksdb::Error> for Error {
} }
fn get_cf_options(name: &'static str) -> Options { fn get_cf_options(name: &'static str) -> Options {
use crate::blocktree::db::columns::{ShredCode, ShredData, Index}; use crate::blocktree::db::columns::{ErasureMeta, Index, ShredCode, ShredData};
let mut options = Options::default(); let mut options = Options::default();
match name { match name {
ShredCode::NAME | ShredData::NAME | Index::NAME => { ShredCode::NAME | ShredData::NAME | Index::NAME | ErasureMeta::NAME => {
// 512MB * 8 = 4GB. 2 of these columns should take no more than 8GB of RAM // 512MB * 8 = 4GB. 2 of these columns should take no more than 8GB of RAM
options.set_max_write_buffer_number(8); options.set_max_write_buffer_number(8);
options.set_write_buffer_size(MAX_WRITE_BUFFER_SIZE as usize); options.set_write_buffer_size(MAX_WRITE_BUFFER_SIZE as usize);