mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Backed out 1 changesets (bug 1716291) for bc failures on browser_startup_mainthreadio.js . CLOSED TREE
Backed out changeset 9cbf4fe3f852 (bug 1716291)
This commit is contained in:
parent
78c2b432df
commit
223d5b8e6b
@ -11,7 +11,7 @@ use nserror::{nsresult, NS_ERROR_FAILURE};
|
||||
use nsstring::nsCString;
|
||||
use owned_value::owned_to_variant;
|
||||
use rkv::backend::{BackendInfo, SafeMode, SafeModeDatabase, SafeModeEnvironment};
|
||||
use rkv::{OwnedValue, StoreError, StoreOptions, Value};
|
||||
use rkv::{Migrator, OwnedValue, StoreError, StoreOptions, Value};
|
||||
use std::{
|
||||
path::Path,
|
||||
str,
|
||||
@ -199,15 +199,7 @@ impl Task for GetOrCreateTask {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1531887
|
||||
let path = Path::new(str::from_utf8(&self.path)?);
|
||||
let rkv = manager.get_or_create(path, Rkv::new::<SafeMode>)?;
|
||||
|
||||
// We used to call Migrator::easy_migrate_lmdb_to_safe_mode()
|
||||
// to migrate from an LMDB backing store to the safe mode store,
|
||||
// but it appears to create/lock the LMDB files if they don't
|
||||
// already exist, resulting in failures during profile deletion.
|
||||
//
|
||||
// So instead we now ignore an old LMDB backing store (after we
|
||||
// included migration long enough to migrate almost everyone).
|
||||
|
||||
Migrator::easy_migrate_lmdb_to_safe_mode(path, rkv.read()?)?;
|
||||
{
|
||||
let env = rkv.read()?;
|
||||
let load_ratio = env.load_ratio()?.unwrap_or(0.0);
|
||||
|
@ -11,7 +11,7 @@ use moz_task::is_main_thread;
|
||||
use nsstring::nsString;
|
||||
use once_cell::sync::Lazy;
|
||||
use rkv::backend::{SafeMode, SafeModeDatabase, SafeModeEnvironment};
|
||||
use rkv::{StoreOptions, Value};
|
||||
use rkv::{Migrator, StoreOptions, Value};
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
fs::{create_dir_all, remove_file, File},
|
||||
@ -50,15 +50,7 @@ pub(crate) fn get_database() -> XULStoreResult<Database> {
|
||||
let xulstore_dir = get_xulstore_dir()?;
|
||||
let xulstore_path = xulstore_dir.as_path();
|
||||
let rkv = manager.get_or_create(xulstore_path, Rkv::new::<SafeMode>)?;
|
||||
|
||||
// We used to call Migrator::easy_migrate_lmdb_to_safe_mode()
|
||||
// to migrate from an LMDB backing store to the safe mode store,
|
||||
// but it appears to create/lock the LMDB files if they don't
|
||||
// already exist, resulting in failures during profile deletion.
|
||||
//
|
||||
// So instead we now ignore an old LMDB backing store (after we
|
||||
// included migration long enough to migrate almost everyone).
|
||||
|
||||
Migrator::easy_migrate_lmdb_to_safe_mode(xulstore_path, rkv.read()?)?;
|
||||
let store = rkv.read()?.open_single("db", StoreOptions::create())?;
|
||||
Ok(Database::new(rkv, store))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user