Repository navigation
fix(bulk): skip a record_too_large record instead of stopping the upload - #222
Merged
Merged
Conversation
A record over maxNestedDocs failed the whole bulk request, so one large record kept every other record of the dataset out of the index. It is now skipped with a warning and counted in the new recordsTooLarge stat.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #222 +/- ##
==========================================
+ Coverage 36.93% 36.95% +0.02%
==========================================
Files 414 414
Lines 38321 38326 +5
==========================================
+ Hits 14152 14164 +12
+ Misses 24167 24160 -7
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
A record over
elasticsearch.maxNestedDocsreturned an error fromParser.process, andParsestops the whole upload on the first error. One large record therefore kept every other record of the upload out of the index.Parsenow skips arecord_too_largerecord: it logs a warning with the hubID and counts it in a newrecordsTooLargestat. Every other error still stops the upload as before.Testing
TestParseSkipsRecordTooLarge: an upload with one record over the limit and one under it indexes the small record and counts the big one. It failed before the fix.make test: all suites pass, including the testcontainers ones. Thestaticcheckstep panics on main as well (staticcheck v0.6.1), unrelated to this change.