windows: handle large mapsizes gracefully
Update nostrdb to gracefully handle mapsizes that are too large and fail to create nostrdb files. We now keep shrinking the mapsize until database creation succeeds. We still use the default mapsize of 32GiB on windows, which is a bit annoying until we have nostrdb resizing like monero. Fixes: https://github.com/damus-io/notedeck/issues/491
This commit is contained in:
@@ -402,8 +402,7 @@ impl Damus {
|
||||
let imgcache_dir = path.path(DataPathType::Cache).join(ImageCache::rel_dir());
|
||||
let _ = std::fs::create_dir_all(imgcache_dir.clone());
|
||||
|
||||
let mut config = Config::new();
|
||||
config.set_ingester_threads(4);
|
||||
let config = Config::new().set_ingester_threads(4);
|
||||
|
||||
let keystore = if parsed_args.use_keystore {
|
||||
let keys_path = path.path(DataPathType::Keys);
|
||||
@@ -587,8 +586,7 @@ impl Damus {
|
||||
let app_rect_handler = AppSizeHandler::new(&path);
|
||||
let support = Support::new(&path);
|
||||
|
||||
let mut config = Config::new();
|
||||
config.set_ingester_threads(2);
|
||||
let config = Config::new().set_ingester_threads(2);
|
||||
|
||||
Self {
|
||||
debug,
|
||||
|
||||
Reference in New Issue
Block a user