mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
Merge pull request #107 from Kerollmops/update-dependencies
Update dependencies
This commit is contained in:
commit
ce50e74491
@ -7,7 +7,7 @@ authors = ["Kerollmops <renault.cle@gmail.com>"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bincode = "1.0"
|
bincode = "1.0"
|
||||||
byteorder = "1.2"
|
byteorder = "1.2"
|
||||||
crossbeam = "0.6"
|
arc-swap = "0.3"
|
||||||
elapsed = "0.1"
|
elapsed = "0.1"
|
||||||
fst = "0.3"
|
fst = "0.3"
|
||||||
hashbrown = { version = "0.1", features = ["serde"] }
|
hashbrown = { version = "0.1", features = ["serde"] }
|
||||||
@ -19,7 +19,7 @@ sdset = "0.3"
|
|||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
slice-group-by = "0.2.3-alpha"
|
slice-group-by = "0.2"
|
||||||
unidecode = "0.3"
|
unidecode = "0.3"
|
||||||
rayon = "1.0"
|
rayon = "1.0"
|
||||||
lockfree = "0.5.1"
|
lockfree = "0.5.1"
|
||||||
|
@ -11,7 +11,7 @@ use std::ops::{Deref, DerefMut};
|
|||||||
use rocksdb::rocksdb_options::{DBOptions, ColumnFamilyOptions};
|
use rocksdb::rocksdb_options::{DBOptions, ColumnFamilyOptions};
|
||||||
use rocksdb::rocksdb::{Writable, Snapshot};
|
use rocksdb::rocksdb::{Writable, Snapshot};
|
||||||
use rocksdb::{DB, MergeOperands};
|
use rocksdb::{DB, MergeOperands};
|
||||||
use crossbeam::atomic::ArcCell;
|
use arc_swap::ArcSwap;
|
||||||
use lockfree::map::Map;
|
use lockfree::map::Map;
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use log::{info, error, warn};
|
use log::{info, error, warn};
|
||||||
@ -141,7 +141,7 @@ struct DatabaseIndex {
|
|||||||
db: Arc<DB>,
|
db: Arc<DB>,
|
||||||
|
|
||||||
// This view is updated each time the DB ingests an update.
|
// This view is updated each time the DB ingests an update.
|
||||||
view: ArcCell<DatabaseView<Arc<DB>>>,
|
view: ArcSwap<DatabaseView<Arc<DB>>>,
|
||||||
|
|
||||||
// The path of the mdb folder stored on disk.
|
// The path of the mdb folder stored on disk.
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
@ -175,7 +175,7 @@ impl DatabaseIndex {
|
|||||||
|
|
||||||
let db = Arc::new(db);
|
let db = Arc::new(db);
|
||||||
let snapshot = Snapshot::new(db.clone());
|
let snapshot = Snapshot::new(db.clone());
|
||||||
let view = ArcCell::new(Arc::new(DatabaseView::new(snapshot)?));
|
let view = ArcSwap::new(Arc::new(DatabaseView::new(snapshot)?));
|
||||||
|
|
||||||
Ok(DatabaseIndex {
|
Ok(DatabaseIndex {
|
||||||
db: db,
|
db: db,
|
||||||
@ -204,7 +204,7 @@ impl DatabaseIndex {
|
|||||||
|
|
||||||
let db = Arc::new(db);
|
let db = Arc::new(db);
|
||||||
let snapshot = Snapshot::new(db.clone());
|
let snapshot = Snapshot::new(db.clone());
|
||||||
let view = ArcCell::new(Arc::new(DatabaseView::new(snapshot)?));
|
let view = ArcSwap::new(Arc::new(DatabaseView::new(snapshot)?));
|
||||||
|
|
||||||
Ok(DatabaseIndex {
|
Ok(DatabaseIndex {
|
||||||
db: db,
|
db: db,
|
||||||
@ -233,13 +233,13 @@ impl DatabaseIndex {
|
|||||||
|
|
||||||
let snapshot = Snapshot::new(self.db.clone());
|
let snapshot = Snapshot::new(self.db.clone());
|
||||||
let view = Arc::new(DatabaseView::new(snapshot)?);
|
let view = Arc::new(DatabaseView::new(snapshot)?);
|
||||||
self.view.set(view.clone());
|
self.view.store(view.clone());
|
||||||
|
|
||||||
Ok(view)
|
Ok(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&self) -> Arc<DatabaseView<Arc<DB>>> {
|
fn view(&self) -> Arc<DatabaseView<Arc<DB>>> {
|
||||||
self.view.get()
|
self.view.load()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user