Skip to content

Commit

Permalink
wait for merge at end of local ingest (#5542)
Browse files Browse the repository at this point in the history
  • Loading branch information
trinity-1686a authored Nov 18, 2024
1 parent 23289a1 commit fe0f39a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion quickwit/quickwit-cli/src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,11 @@ pub async fn local_ingest_docs_cli(args: LocalIngestDocsArgs) -> anyhow::Result<
let statistics =
start_statistics_reporting_loop(indexing_pipeline_handle, args.input_path_opt.is_none())
.await?;
merge_pipeline_handle.quit().await;
merge_pipeline_handle
.mailbox()
.ask(quickwit_indexing::FinishPendingMergesAndShutdownPipeline)
.await?;
merge_pipeline_handle.join().await;
// Shutdown the indexing server.
universe
.send_exit_with_success(&indexing_server_mailbox)
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-indexing/src/actors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub use indexer::{Indexer, IndexerCounters};
pub use indexing_pipeline::{IndexingPipeline, IndexingPipelineParams};
pub use indexing_service::{IndexingService, IndexingServiceCounters, INDEXING_DIR_NAME};
pub use merge_executor::{combine_partition_ids, merge_split_attrs, MergeExecutor};
pub use merge_pipeline::MergePipeline;
pub use merge_pipeline::{FinishPendingMergesAndShutdownPipeline, MergePipeline};
pub(crate) use merge_planner::{MergePlanner, RunFinalizeMergePolicyAndQuit};
pub use merge_scheduler_service::{schedule_merge, MergePermit, MergeSchedulerService};
pub use merge_split_downloader::MergeSplitDownloader;
Expand Down
4 changes: 2 additions & 2 deletions quickwit/quickwit-indexing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ use tracing::info;

use crate::actors::MergeSchedulerService;
pub use crate::actors::{
IndexingError, IndexingPipeline, IndexingPipelineParams, IndexingService, PublisherType,
Sequencer, SplitsUpdateMailbox,
FinishPendingMergesAndShutdownPipeline, IndexingError, IndexingPipeline,
IndexingPipelineParams, IndexingService, PublisherType, Sequencer, SplitsUpdateMailbox,
};
pub use crate::controlled_directory::ControlledDirectory;
use crate::models::IndexingStatistics;
Expand Down

0 comments on commit fe0f39a

Please sign in to comment.