Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mrecordlog to 0.4 #3600

Merged
merged 2 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions quickwit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion quickwit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ matches = "0.1.9"
md5 = "0.7"
mime_guess = "2.0.4"
mockall = "0.11"
mrecordlog = "0.3"
mrecordlog = "0.4"
new_string_template = "1.4.0"
nom = "7.1.3"
num_cpus = "1"
Expand Down
11 changes: 0 additions & 11 deletions quickwit/quickwit-ingest/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ impl From<AppendError> for IngestServiceError {
AppendError::Past => IngestServiceError::InvalidPosition(
"Attempted to append a record in the past".to_string(),
),
AppendError::Future => IngestServiceError::InvalidPosition(
"Attempted to append a record in the future".to_string(),
),
}
}
}
Expand All @@ -175,14 +172,6 @@ impl From<TruncateError> for IngestServiceError {
match err {
TruncateError::IoError(io_error) => io_error.into(),
TruncateError::MissingQueue(index_id) => IngestServiceError::IndexNotFound { index_id },
// this error shouldn't happen (except due to a bug in MRecordLog?)
TruncateError::TouchError(_) => IngestServiceError::InvalidPosition(
"Attempted to touch at an invalid position".to_string(),
),
// this error can happen now, it used to happily trunk everything
TruncateError::Future => IngestServiceError::InvalidPosition(
"Attempted to truncate past last ingested record".to_string(),
),
}
}
}
4 changes: 3 additions & 1 deletion quickwit/quickwit-ingest/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ impl Queues {
let records = self
.record_log
.range(&real_queue_id, (starting_bound, Bound::Unbounded))
.ok_or_else(|| crate::IngestServiceError::IndexNotFound {
.map_err(|_| crate::IngestServiceError::IndexNotFound {
// we want to return the queue_id, not the real_queue_id, so we can't just
// implement From<MissingQueue>
index_id: queue_id.to_string(),
})?;

Expand Down
Loading