diff --git a/one/src/lib.rs b/one/src/lib.rs index 748763de..3eda4c83 100644 --- a/one/src/lib.rs +++ b/one/src/lib.rs @@ -198,20 +198,20 @@ struct DBOpts { /// Use the negative version, which represents Kib e.g. 20000 = 20 Mb /// Or the postive version, representing pages /// None means the default is used. - cache_size: Option, + db_cache_size: Option, /// Used for pragma mmap_size /// 10737418240: 10 GB of memory mapped IO /// if this is slightly bigger than your db file it can improve read performance /// Set to 0 to disable. None is the default #[arg(long, env = "CERAMIC_ONE_DB_MMAP_SIZE")] - mmap_size: Option, + db_mmap_size: Option, /// The maximum number of read only connections in the pool #[arg(long, default_value = "8", env = "CERAMIC_ONE_DB_MAX_CONNECTIONS")] - max_connections: u32, + db_max_connections: u32, /// The sqlite temp_store value to use /// 0 = default, 1 = file, 2 = memory #[arg(long, env = "CERAMIC_ONE_TEMP_STORE")] - temp_store: Option, + db_temp_store: Option, } // Shared options for how logging is configured. @@ -274,10 +274,10 @@ impl DBOpts { Ok(ceramic_sql::sqlite::SqlitePool::connect( &sql_db_path, SqliteOpts { - mmap_size: self.mmap_size, - cache_size: self.cache_size, - max_ro_connections: self.max_connections, - temp_store: self.temp_store.map(|t| t.into()), + mmap_size: self.db_mmap_size, + cache_size: self.db_cache_size, + max_ro_connections: self.db_max_connections, + temp_store: self.db_temp_store.map(|t| t.into()), }, ceramic_sql::sqlite::Migrations::Apply, ) diff --git a/one/src/migrations.rs b/one/src/migrations.rs index 3c05c20e..478a3b00 100644 --- a/one/src/migrations.rs +++ b/one/src/migrations.rs @@ -110,10 +110,10 @@ impl From<&FromIpfsOpts> for DBOpts { fn from(value: &FromIpfsOpts) -> Self { Self { store_dir: value.output_store_path.clone(), - mmap_size: None, - cache_size: None, - max_connections: 8, - temp_store: None, + db_mmap_size: None, + db_cache_size: None, + db_max_connections: 8, + db_temp_store: None, } } }