Clarify the tail writing to database

This commit is contained in:
Kerollmops 2025-02-20 16:58:45 +01:00
parent 245a55722a
commit 76fd5d92d7
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
3 changed files with 8 additions and 8 deletions

View File

@ -133,8 +133,8 @@ async fn check_the_index_scheduler(server: &Server) {
},
@r###"
{
"databaseSize": [bytes],
"usedDatabaseSize": [bytes],
"databaseSize": "[bytes]",
"usedDatabaseSize": "[bytes]",
"lastUpdate": "2025-01-23T11:36:22.634859166Z",
"indexes": {
"kefir": {
@ -213,14 +213,14 @@ async fn check_the_index_scheduler(server: &Server) {
snapshot!(json_string!(batches, { ".results[0].duration" => "[duration]", ".results[0].enqueuedAt" => "[date]", ".results[0].startedAt" => "[date]", ".results[0].finishedAt" => "[date]", ".results[0].stats.callTrace" => "[callTrace]", ".results[0].stats.writeChannelCongestion" => "[writeChannelCongestion]" }), name: "batches_filter_afterFinishedAt_equal_2025-01-16T16_47_41");
let (stats, _) = server.stats().await;
snapshot!(stats, {
assert_json_snapshot!(stats, {
".databaseSize" => "[bytes]",
".usedDatabaseSize" => "[bytes]"
},
@r###"
{
"databaseSize": [bytes],
"usedDatabaseSize": [bytes],
"databaseSize": "[bytes]",
"usedDatabaseSize": "[bytes]",
"lastUpdate": "2025-01-23T11:36:22.634859166Z",
"indexes": {
"kefir": {

View File

@ -291,7 +291,7 @@ where
&indexing_context.must_stop_processing,
)?;
}
indexing_context.progress.update_progress(IndexingStep::TailWritingToDatabase);
indexing_context.progress.update_progress(IndexingStep::WaitingForDatabaseWrites);
finished_extraction.store(true, std::sync::atomic::Ordering::Relaxed);
Result::Ok((facet_field_ids_delta, index_embeddings))

View File

@ -14,7 +14,7 @@ pub enum IndexingStep {
ExtractingWordProximity,
ExtractingEmbeddings,
WritingGeoPoints,
TailWritingToDatabase,
WaitingForDatabaseWrites,
WaitingForExtractors,
WritingEmbeddingsToDatabase,
PostProcessingFacets,
@ -32,7 +32,7 @@ impl Step for IndexingStep {
IndexingStep::ExtractingWordProximity => "extracting word proximity",
IndexingStep::ExtractingEmbeddings => "extracting embeddings",
IndexingStep::WritingGeoPoints => "writing geo points",
IndexingStep::TailWritingToDatabase => "tail writing to database",
IndexingStep::WaitingForDatabaseWrites => "waiting for database writes",
IndexingStep::WaitingForExtractors => "waiting for extractors",
IndexingStep::WritingEmbeddingsToDatabase => "writing embeddings to database",
IndexingStep::PostProcessingFacets => "post-processing facets",