Bumped tantivy and subcrate versions.

This commit is contained in:
Paul Masurel
2022-05-25 22:50:33 +09:00
parent fcfdc44c61
commit f0a2b1cc44
14 changed files with 27 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "tantivy" name = "tantivy"
version = "0.17.0" version = "0.18.0"
authors = ["Paul Masurel <paul.masurel@gmail.com>"] authors = ["Paul Masurel <paul.masurel@gmail.com>"]
license = "MIT" license = "MIT"
categories = ["database-implementations", "data-structures"] categories = ["database-implementations", "data-structures"]
@@ -33,12 +33,12 @@ num_cpus = "1.13.1"
fs2={ version = "0.4.3", optional = true } fs2={ version = "0.4.3", optional = true }
levenshtein_automata = "0.2.1" levenshtein_automata = "0.2.1"
uuid = { version = "1.0.0", features = ["v4", "serde"] } 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-query-grammar = { version="0.18.0", path="./query-grammar" }
tantivy-bitpacker = { version="0.1", path="./bitpacker" } tantivy-bitpacker = { version="0.2", path="./bitpacker" }
common = { version = "0.2", path = "./common/", package = "tantivy-common" } common = { version = "0.3", path = "./common/", package = "tantivy-common" }
fastfield_codecs = { version="0.1", path="./fastfield_codecs", default-features = false } fastfield_codecs = { version="0.2", path="./fastfield_codecs", default-features = false }
ownedbytes = { version="0.2", path="./ownedbytes" } ownedbytes = { version="0.3", path="./ownedbytes" }
stable_deref_trait = "1.2.0" stable_deref_trait = "1.2.0"
rust-stemmers = "1.2.0" rust-stemmers = "1.2.0"
downcast-rs = "1.2.0" downcast-rs = "1.2.0"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "tantivy-bitpacker" name = "tantivy-bitpacker"
version = "0.1.1" version = "0.2.0"
edition = "2018" edition = "2018"
authors = ["Paul Masurel <paul.masurel@gmail.com>"] authors = ["Paul Masurel <paul.masurel@gmail.com>"]
license = "MIT" license = "MIT"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "tantivy-common" name = "tantivy-common"
version = "0.2.0" version = "0.3.0"
authors = ["Paul Masurel <paul@quickwit.io>", "Pascal Seitz <pascal@quickwit.io>"] authors = ["Paul Masurel <paul@quickwit.io>", "Pascal Seitz <pascal@quickwit.io>"]
license = "MIT" license = "MIT"
edition = "2018" edition = "2018"
@@ -10,7 +10,7 @@ description = "common traits and utility functions used by multiple tantivy subc
[dependencies] [dependencies]
byteorder = "1.4.3" byteorder = "1.4.3"
ownedbytes = { version="0.2", path="../ownedbytes" } ownedbytes = { version="0.3", path="../ownedbytes" }
[dev-dependencies] [dev-dependencies]
proptest = "1.0.0" proptest = "1.0.0"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "fastfield_codecs" name = "fastfield_codecs"
version = "0.1.0" version = "0.2.0"
authors = ["Pascal Seitz <pascal@quickwit.io>"] authors = ["Pascal Seitz <pascal@quickwit.io>"]
license = "MIT" license = "MIT"
edition = "2018" 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 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
common = { version = "0.2", path = "../common/", package = "tantivy-common" } common = { version = "0.3", path = "../common/", package = "tantivy-common" }
tantivy-bitpacker = { version="0.1.1", path = "../bitpacker/" } tantivy-bitpacker = { version="0.2", path = "../bitpacker/" }
prettytable-rs = {version="0.8.0", optional= true} prettytable-rs = {version="0.8.0", optional= true}
rand = {version="0.8.3", optional= true} rand = {version="0.8.3", optional= true}

View File

@@ -1,7 +1,7 @@
[package] [package]
authors = ["Paul Masurel <paul@quickwit.io>", "Pascal Seitz <pascal@quickwit.io>"] authors = ["Paul Masurel <paul@quickwit.io>", "Pascal Seitz <pascal@quickwit.io>"]
name = "ownedbytes" name = "ownedbytes"
version = "0.2.0" version = "0.3.0"
edition = "2018" edition = "2018"
description = "Expose data as static slice" description = "Expose data as static slice"
license = "MIT" license = "MIT"

View File

@@ -1,4 +1,3 @@
use crossbeam::channel;
use rayon::{ThreadPool, ThreadPoolBuilder}; use rayon::{ThreadPool, ThreadPoolBuilder};
use crate::TantivyError; use crate::TantivyError;
@@ -52,7 +51,7 @@ impl Executor {
let args: Vec<A> = args.collect(); let args: Vec<A> = args.collect();
let num_fruits = args.len(); let num_fruits = args.len();
let fruit_receiver = { let fruit_receiver = {
let (fruit_sender, fruit_receiver) = channel::unbounded(); let (fruit_sender, fruit_receiver) = crossbeam_channel::unbounded();
pool.scope(|scope| { pool.scope(|scope| {
for (idx, arg) in args.into_iter().enumerate() { for (idx, arg) in args.into_iter().enumerate() {
// We name references for f and fruit_sender_ref because we do not // We name references for f and fruit_sender_ref because we do not

View File

@@ -744,7 +744,7 @@ mod tests {
.try_into()?; .try_into()?;
assert_eq!(reader.searcher().num_docs(), 0); assert_eq!(reader.searcher().num_docs(), 0);
writer.add_document(doc!(field=>1u64))?; 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 _handle = index.directory_mut().watch(WatchCallback::new(move || {
let _ = sender.send(()); let _ = sender.send(());
})); }));
@@ -779,7 +779,7 @@ mod tests {
reader: &IndexReader, reader: &IndexReader,
) -> crate::Result<()> { ) -> crate::Result<()> {
let mut reader_index = reader.index(); let mut reader_index = reader.index();
let (sender, receiver) = crossbeam::channel::unbounded(); let (sender, receiver) = crossbeam_channel::unbounded();
let _watch_handle = reader_index let _watch_handle = reader_index
.directory_mut() .directory_mut()
.watch(WatchCallback::new(move || { .watch(WatchCallback::new(move || {

View File

@@ -110,7 +110,7 @@ mod tests {
let tmp_file = tmp_dir.path().join("watched.txt"); let tmp_file = tmp_dir.path().join("watched.txt");
let counter: Arc<AtomicUsize> = Default::default(); let counter: Arc<AtomicUsize> = Default::default();
let (tx, rx) = crossbeam::channel::unbounded(); let (tx, rx) = crossbeam_channel::unbounded();
let timeout = Duration::from_millis(100); let timeout = Duration::from_millis(100);
let watcher = FileWatcher::new(&tmp_file); let watcher = FileWatcher::new(&tmp_file);
@@ -153,7 +153,7 @@ mod tests {
let tmp_file = tmp_dir.path().join("watched.txt"); let tmp_file = tmp_dir.path().join("watched.txt");
let counter: Arc<AtomicUsize> = Default::default(); let counter: Arc<AtomicUsize> = Default::default();
let (tx, rx) = crossbeam::channel::unbounded(); let (tx, rx) = crossbeam_channel::unbounded();
let timeout = Duration::from_millis(100); let timeout = Duration::from_millis(100);
let watcher = FileWatcher::new(&tmp_file); let watcher = FileWatcher::new(&tmp_file);

View File

@@ -181,7 +181,7 @@ fn test_directory_delete(directory: &dyn Directory) -> crate::Result<()> {
fn test_watch(directory: &dyn Directory) { fn test_watch(directory: &dyn Directory) {
let counter: Arc<AtomicUsize> = Default::default(); let counter: Arc<AtomicUsize> = Default::default();
let (tx, rx) = crossbeam::channel::unbounded(); let (tx, rx) = crossbeam_channel::unbounded();
let timeout = Duration::from_millis(500); let timeout = Duration::from_millis(500);
let handle = directory let handle = directory

View File

@@ -4,7 +4,6 @@ use std::thread;
use std::thread::JoinHandle; use std::thread::JoinHandle;
use common::BitSet; use common::BitSet;
use crossbeam::channel;
use smallvec::smallvec; use smallvec::smallvec;
use super::operation::{AddOperation, UserOperation}; use super::operation::{AddOperation, UserOperation};
@@ -289,7 +288,7 @@ impl IndexWriter {
return Err(TantivyError::InvalidArgument(err_msg)); return Err(TantivyError::InvalidArgument(err_msg));
} }
let (document_sender, document_receiver): (AddBatchSender, AddBatchReceiver) = 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(); let delete_queue = DeleteQueue::new();
@@ -326,7 +325,7 @@ impl IndexWriter {
} }
fn drop_sender(&mut self) { fn drop_sender(&mut self) {
let (sender, _receiver) = channel::bounded(1); let (sender, _receiver) = crossbeam_channel::bounded(1);
self.operation_sender = sender; self.operation_sender = sender;
} }
@@ -532,7 +531,7 @@ impl IndexWriter {
/// Returns the former segment_ready channel. /// Returns the former segment_ready channel.
fn recreate_document_channel(&mut self) { fn recreate_document_channel(&mut self) {
let (document_sender, document_receiver): (AddBatchSender, AddBatchReceiver) = 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.operation_sender = document_sender;
self.index_writer_status = IndexWriterStatus::from(document_receiver); self.index_writer_status = IndexWriterStatus::from(document_receiver);
} }

View File

@@ -92,7 +92,7 @@ impl Drop for IndexWriterBomb {
mod tests { mod tests {
use std::mem; use std::mem;
use crossbeam::channel; use crossbeam_channel as channel;
use super::IndexWriterStatus; use super::IndexWriterStatus;

View File

@@ -21,7 +21,7 @@ pub mod segment_updater;
mod segment_writer; mod segment_writer;
mod stamper; mod stamper;
use crossbeam::channel; use crossbeam_channel as channel;
use smallvec::SmallVec; use smallvec::SmallVec;
pub use self::index_writer::IndexWriter; pub use self::index_writer::IndexWriter;

View File

@@ -2,7 +2,7 @@ use std::ops::{Deref, DerefMut};
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc; use std::sync::Arc;
use crossbeam::channel::{unbounded, Receiver, RecvError, Sender}; use crossbeam_channel::{unbounded, Receiver, RecvError, Sender};
pub struct GenerationItem<T> { pub struct GenerationItem<T> {
generation: usize, generation: usize,
@@ -197,7 +197,7 @@ mod tests {
use std::{iter, mem}; use std::{iter, mem};
use crossbeam::channel; use crossbeam_channel as channel;
use super::{Pool, Queue}; use super::{Pool, Queue};

View File

@@ -147,7 +147,7 @@ impl WarmingStateInner {
/// Every [GC_INTERVAL] attempt to GC, with panics caught and logged using /// Every [GC_INTERVAL] attempt to GC, with panics caught and logged using
/// [std::panic::catch_unwind]. /// [std::panic::catch_unwind].
fn gc_loop(inner: Weak<Mutex<WarmingStateInner>>) { fn gc_loop(inner: Weak<Mutex<WarmingStateInner>>) {
for _ in crossbeam::channel::tick(GC_INTERVAL) { for _ in crossbeam_channel::tick(GC_INTERVAL) {
if let Some(inner) = inner.upgrade() { if let Some(inner) = inner.upgrade() {
// rely on deterministic gc in tests // rely on deterministic gc in tests
#[cfg(not(test))] #[cfg(not(test))]