Removing invalid docs from persistence.#5206
Merged
fulmicoton merged 1 commit intomainfrom Jul 16, 2024
Merged
Conversation
c83ae27 to
c6fe1f2
Compare
This PR filters out invalid docs from batches before persisting the batch. That way, they won't be persisted in the mrecordlog and the indexing pipeline will not have to parse them again (and log an error). This PR also improves a little bit on the metric for ingested docs. The num_docs and bytes metric now have a validity `label`, and the point at which they are measured is documented in the metric description. Closes #5205
c6fe1f2 to
0a57d53
Compare
trinity-1686a
approved these changes
Jul 10, 2024
| @@ -122,7 +148,7 @@ pub(super) async fn validate_doc_batch( | |||
| doc_mapper: Arc<dyn DocMapper>, | |||
| ) -> IngestV2Result<(DocBatchV2, Vec<ParseFailure>)> { | |||
| if is_document_validation_enabled() { | |||
Contributor
There was a problem hiding this comment.
out of scope for this PR: it might be worth thinking about disabling validation when VRL is present, or to do VRL validation early. I can imagine a document-doc_mapper-VRL combo where not having VRL here causes a document to be rejected, even though it would have been accepted during actual indexation
Collaborator
Author
There was a problem hiding this comment.
excellent point! I'll create an issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.