mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-16 10:11:04 +01:00
Merge branch 'relax-rocksdb' into 'next'
relax recovery mode See merge request famedly/conduit!516
This commit is contained in:
commit
2a100412fa
1 changed files with 7 additions and 0 deletions
|
@ -49,6 +49,13 @@ fn db_options(max_open_files: i32, rocksdb_cache: &rocksdb::Cache) -> rocksdb::O
|
||||||
db_opts.set_max_background_jobs(6);
|
db_opts.set_max_background_jobs(6);
|
||||||
db_opts.set_bytes_per_sync(1048576);
|
db_opts.set_bytes_per_sync(1048576);
|
||||||
|
|
||||||
|
// https://github.com/facebook/rocksdb/wiki/WAL-Recovery-Modes#ktoleratecorruptedtailrecords
|
||||||
|
//
|
||||||
|
// Unclean shutdowns of a Matrix homeserver are likely to be fine when
|
||||||
|
// recovered in this manner as it's likely any lost information will be
|
||||||
|
// restored via federation.
|
||||||
|
db_opts.set_wal_recovery_mode(rocksdb::DBRecoveryMode::TolerateCorruptedTailRecords);
|
||||||
|
|
||||||
let prefix_extractor = rocksdb::SliceTransform::create_fixed_prefix(1);
|
let prefix_extractor = rocksdb::SliceTransform::create_fixed_prefix(1);
|
||||||
db_opts.set_prefix_extractor(prefix_extractor);
|
db_opts.set_prefix_extractor(prefix_extractor);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue