mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
Fix compiler errors related autobatching option of the index scheduler
This commit is contained in:
parent
eabac9676b
commit
9a74ea0943
@ -570,7 +570,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn register() {
|
fn register() {
|
||||||
// In this test, the handle doesn't make any progress, we only check that the tasks are registered
|
// In this test, the handle doesn't make any progress, we only check that the tasks are registered
|
||||||
let (index_scheduler, _handle) = IndexScheduler::test();
|
let (index_scheduler, _handle) = IndexScheduler::test(true);
|
||||||
|
|
||||||
let kinds = [
|
let kinds = [
|
||||||
index_creation_task("catto", "mouse"),
|
index_creation_task("catto", "mouse"),
|
||||||
@ -688,7 +688,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn task_deletion_undeleteable() {
|
fn task_deletion_undeleteable() {
|
||||||
let (index_scheduler, handle) = IndexScheduler::test();
|
let (index_scheduler, handle) = IndexScheduler::test(true);
|
||||||
|
|
||||||
let to_enqueue = [
|
let to_enqueue = [
|
||||||
index_creation_task("catto", "mouse"),
|
index_creation_task("catto", "mouse"),
|
||||||
@ -730,7 +730,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn task_deletion_deleteable() {
|
fn task_deletion_deleteable() {
|
||||||
let (index_scheduler, handle) = IndexScheduler::test();
|
let (index_scheduler, handle) = IndexScheduler::test(true);
|
||||||
|
|
||||||
let (file0, documents_count0) = sample_documents(&index_scheduler, 0, 0);
|
let (file0, documents_count0) = sample_documents(&index_scheduler, 0, 0);
|
||||||
let (file1, documents_count1) = sample_documents(&index_scheduler, 1, 1);
|
let (file1, documents_count1) = sample_documents(&index_scheduler, 1, 1);
|
||||||
|
@ -15,6 +15,7 @@ use crate::{
|
|||||||
|
|
||||||
pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String {
|
pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String {
|
||||||
let IndexScheduler {
|
let IndexScheduler {
|
||||||
|
autobatching_enabled,
|
||||||
processing_tasks,
|
processing_tasks,
|
||||||
file_store: _,
|
file_store: _,
|
||||||
env,
|
env,
|
||||||
@ -32,6 +33,9 @@ pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String {
|
|||||||
let mut snap = String::new();
|
let mut snap = String::new();
|
||||||
|
|
||||||
let (_time, processing_tasks) = processing_tasks.read().unwrap().clone();
|
let (_time, processing_tasks) = processing_tasks.read().unwrap().clone();
|
||||||
|
snap.push_str(&format!(
|
||||||
|
"### Autobatching Enabled = {autobatching_enabled}\n"
|
||||||
|
));
|
||||||
snap.push_str("### Processing Tasks:\n");
|
snap.push_str("### Processing Tasks:\n");
|
||||||
snap.push_str(&snapshot_bitmap(&processing_tasks));
|
snap.push_str(&snapshot_bitmap(&processing_tasks));
|
||||||
snap.push_str("\n----------------------------------------------------------------------\n");
|
snap.push_str("\n----------------------------------------------------------------------\n");
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[0,]
|
[0,]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[0,]
|
[0,]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[3,]
|
[3,]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
source: index-scheduler/src/lib.rs
|
source: index-scheduler/src/lib.rs
|
||||||
expression: snapshot_index_scheduler(&index_scheduler)
|
expression: snapshot_index_scheduler(&index_scheduler)
|
||||||
---
|
---
|
||||||
|
### Autobatching Enabled = true
|
||||||
### Processing Tasks:
|
### Processing Tasks:
|
||||||
[]
|
[]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user