From f0a2b1cc44a5193fb10538ed68c347b70b5e4210 Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Wed, 25 May 2022 22:50:33 +0900 Subject: [PATCH] Bumped tantivy and subcrate versions. --- Cargo.toml | 12 ++++++------ bitpacker/Cargo.toml | 2 +- common/Cargo.toml | 4 ++-- fastfield_codecs/Cargo.toml | 6 +++--- ownedbytes/Cargo.toml | 2 +- src/core/executor.rs | 3 +-- src/core/index.rs | 4 ++-- src/directory/file_watcher.rs | 4 ++-- src/directory/tests.rs | 2 +- src/indexer/index_writer.rs | 7 +++---- src/indexer/index_writer_status.rs | 2 +- src/indexer/mod.rs | 2 +- src/reader/pool.rs | 4 ++-- src/reader/warming.rs | 2 +- 14 files changed, 27 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 659b9f8e97..4899dd119d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tantivy" -version = "0.17.0" +version = "0.18.0" authors = ["Paul Masurel "] license = "MIT" categories = ["database-implementations", "data-structures"] @@ -33,12 +33,12 @@ num_cpus = "1.13.1" fs2={ version = "0.4.3", optional = true } levenshtein_automata = "0.2.1" uuid = { version = "1.0.0", features = ["v4", "serde"] } -crossbeam = "0.8.1" +crossbeam-channel = "0.5.4" tantivy-query-grammar = { version="0.18.0", path="./query-grammar" } -tantivy-bitpacker = { version="0.1", path="./bitpacker" } -common = { version = "0.2", path = "./common/", package = "tantivy-common" } -fastfield_codecs = { version="0.1", path="./fastfield_codecs", default-features = false } -ownedbytes = { version="0.2", path="./ownedbytes" } +tantivy-bitpacker = { version="0.2", path="./bitpacker" } +common = { version = "0.3", path = "./common/", package = "tantivy-common" } +fastfield_codecs = { version="0.2", path="./fastfield_codecs", default-features = false } +ownedbytes = { version="0.3", path="./ownedbytes" } stable_deref_trait = "1.2.0" rust-stemmers = "1.2.0" downcast-rs = "1.2.0" diff --git a/bitpacker/Cargo.toml b/bitpacker/Cargo.toml index 43a339186a..6f9eb5ae5c 100644 --- a/bitpacker/Cargo.toml +++ b/bitpacker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tantivy-bitpacker" -version = "0.1.1" +version = "0.2.0" edition = "2018" authors = ["Paul Masurel "] license = "MIT" diff --git a/common/Cargo.toml b/common/Cargo.toml index e27d5246fa..6a7df405b8 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tantivy-common" -version = "0.2.0" +version = "0.3.0" authors = ["Paul Masurel ", "Pascal Seitz "] license = "MIT" edition = "2018" @@ -10,7 +10,7 @@ description = "common traits and utility functions used by multiple tantivy subc [dependencies] byteorder = "1.4.3" -ownedbytes = { version="0.2", path="../ownedbytes" } +ownedbytes = { version="0.3", path="../ownedbytes" } [dev-dependencies] proptest = "1.0.0" diff --git a/fastfield_codecs/Cargo.toml b/fastfield_codecs/Cargo.toml index a8540142d9..c654e83464 100644 --- a/fastfield_codecs/Cargo.toml +++ b/fastfield_codecs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fastfield_codecs" -version = "0.1.0" +version = "0.2.0" authors = ["Pascal Seitz "] license = "MIT" edition = "2018" @@ -9,8 +9,8 @@ description = "Fast field codecs used by tantivy" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -common = { version = "0.2", path = "../common/", package = "tantivy-common" } -tantivy-bitpacker = { version="0.1.1", path = "../bitpacker/" } +common = { version = "0.3", path = "../common/", package = "tantivy-common" } +tantivy-bitpacker = { version="0.2", path = "../bitpacker/" } prettytable-rs = {version="0.8.0", optional= true} rand = {version="0.8.3", optional= true} diff --git a/ownedbytes/Cargo.toml b/ownedbytes/Cargo.toml index b73379b659..40a8cbf3e3 100644 --- a/ownedbytes/Cargo.toml +++ b/ownedbytes/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Paul Masurel ", "Pascal Seitz "] name = "ownedbytes" -version = "0.2.0" +version = "0.3.0" edition = "2018" description = "Expose data as static slice" license = "MIT" diff --git a/src/core/executor.rs b/src/core/executor.rs index def78eb938..b05fcd3b29 100644 --- a/src/core/executor.rs +++ b/src/core/executor.rs @@ -1,4 +1,3 @@ -use crossbeam::channel; use rayon::{ThreadPool, ThreadPoolBuilder}; use crate::TantivyError; @@ -52,7 +51,7 @@ impl Executor { let args: Vec = args.collect(); let num_fruits = args.len(); let fruit_receiver = { - let (fruit_sender, fruit_receiver) = channel::unbounded(); + let (fruit_sender, fruit_receiver) = crossbeam_channel::unbounded(); pool.scope(|scope| { for (idx, arg) in args.into_iter().enumerate() { // We name references for f and fruit_sender_ref because we do not diff --git a/src/core/index.rs b/src/core/index.rs index 4a96ef0135..2b9801770f 100644 --- a/src/core/index.rs +++ b/src/core/index.rs @@ -744,7 +744,7 @@ mod tests { .try_into()?; assert_eq!(reader.searcher().num_docs(), 0); writer.add_document(doc!(field=>1u64))?; - let (sender, receiver) = crossbeam::channel::unbounded(); + let (sender, receiver) = crossbeam_channel::unbounded(); let _handle = index.directory_mut().watch(WatchCallback::new(move || { let _ = sender.send(()); })); @@ -779,7 +779,7 @@ mod tests { reader: &IndexReader, ) -> crate::Result<()> { let mut reader_index = reader.index(); - let (sender, receiver) = crossbeam::channel::unbounded(); + let (sender, receiver) = crossbeam_channel::unbounded(); let _watch_handle = reader_index .directory_mut() .watch(WatchCallback::new(move || { diff --git a/src/directory/file_watcher.rs b/src/directory/file_watcher.rs index 23a3204420..02bcd936ae 100644 --- a/src/directory/file_watcher.rs +++ b/src/directory/file_watcher.rs @@ -110,7 +110,7 @@ mod tests { let tmp_file = tmp_dir.path().join("watched.txt"); let counter: Arc = Default::default(); - let (tx, rx) = crossbeam::channel::unbounded(); + let (tx, rx) = crossbeam_channel::unbounded(); let timeout = Duration::from_millis(100); let watcher = FileWatcher::new(&tmp_file); @@ -153,7 +153,7 @@ mod tests { let tmp_file = tmp_dir.path().join("watched.txt"); let counter: Arc = Default::default(); - let (tx, rx) = crossbeam::channel::unbounded(); + let (tx, rx) = crossbeam_channel::unbounded(); let timeout = Duration::from_millis(100); let watcher = FileWatcher::new(&tmp_file); diff --git a/src/directory/tests.rs b/src/directory/tests.rs index 5d1d9dd460..9ceae1409e 100644 --- a/src/directory/tests.rs +++ b/src/directory/tests.rs @@ -181,7 +181,7 @@ fn test_directory_delete(directory: &dyn Directory) -> crate::Result<()> { fn test_watch(directory: &dyn Directory) { let counter: Arc = Default::default(); - let (tx, rx) = crossbeam::channel::unbounded(); + let (tx, rx) = crossbeam_channel::unbounded(); let timeout = Duration::from_millis(500); let handle = directory diff --git a/src/indexer/index_writer.rs b/src/indexer/index_writer.rs index ff71742d4c..18cb81faec 100644 --- a/src/indexer/index_writer.rs +++ b/src/indexer/index_writer.rs @@ -4,7 +4,6 @@ use std::thread; use std::thread::JoinHandle; use common::BitSet; -use crossbeam::channel; use smallvec::smallvec; use super::operation::{AddOperation, UserOperation}; @@ -289,7 +288,7 @@ impl IndexWriter { return Err(TantivyError::InvalidArgument(err_msg)); } let (document_sender, document_receiver): (AddBatchSender, AddBatchReceiver) = - channel::bounded(PIPELINE_MAX_SIZE_IN_DOCS); + crossbeam_channel::bounded(PIPELINE_MAX_SIZE_IN_DOCS); let delete_queue = DeleteQueue::new(); @@ -326,7 +325,7 @@ impl IndexWriter { } fn drop_sender(&mut self) { - let (sender, _receiver) = channel::bounded(1); + let (sender, _receiver) = crossbeam_channel::bounded(1); self.operation_sender = sender; } @@ -532,7 +531,7 @@ impl IndexWriter { /// Returns the former segment_ready channel. fn recreate_document_channel(&mut self) { let (document_sender, document_receiver): (AddBatchSender, AddBatchReceiver) = - channel::bounded(PIPELINE_MAX_SIZE_IN_DOCS); + crossbeam_channel::bounded(PIPELINE_MAX_SIZE_IN_DOCS); self.operation_sender = document_sender; self.index_writer_status = IndexWriterStatus::from(document_receiver); } diff --git a/src/indexer/index_writer_status.rs b/src/indexer/index_writer_status.rs index 428b703d2d..b0c2b30740 100644 --- a/src/indexer/index_writer_status.rs +++ b/src/indexer/index_writer_status.rs @@ -92,7 +92,7 @@ impl Drop for IndexWriterBomb { mod tests { use std::mem; - use crossbeam::channel; + use crossbeam_channel as channel; use super::IndexWriterStatus; diff --git a/src/indexer/mod.rs b/src/indexer/mod.rs index 37bdb1ba1e..16766025eb 100644 --- a/src/indexer/mod.rs +++ b/src/indexer/mod.rs @@ -21,7 +21,7 @@ pub mod segment_updater; mod segment_writer; mod stamper; -use crossbeam::channel; +use crossbeam_channel as channel; use smallvec::SmallVec; pub use self::index_writer::IndexWriter; diff --git a/src/reader/pool.rs b/src/reader/pool.rs index a6e002a1fa..43baf922a1 100644 --- a/src/reader/pool.rs +++ b/src/reader/pool.rs @@ -2,7 +2,7 @@ use std::ops::{Deref, DerefMut}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; -use crossbeam::channel::{unbounded, Receiver, RecvError, Sender}; +use crossbeam_channel::{unbounded, Receiver, RecvError, Sender}; pub struct GenerationItem { generation: usize, @@ -197,7 +197,7 @@ mod tests { use std::{iter, mem}; - use crossbeam::channel; + use crossbeam_channel as channel; use super::{Pool, Queue}; diff --git a/src/reader/warming.rs b/src/reader/warming.rs index dcfe95a15b..cf1fd8742f 100644 --- a/src/reader/warming.rs +++ b/src/reader/warming.rs @@ -147,7 +147,7 @@ impl WarmingStateInner { /// Every [GC_INTERVAL] attempt to GC, with panics caught and logged using /// [std::panic::catch_unwind]. fn gc_loop(inner: Weak>) { - for _ in crossbeam::channel::tick(GC_INTERVAL) { + for _ in crossbeam_channel::tick(GC_INTERVAL) { if let Some(inner) = inner.upgrade() { // rely on deterministic gc in tests #[cfg(not(test))]