Skip to content

fix(bulk): skip a record_too_large record instead of stopping the upload - #222

Merged
kiivihal merged 1 commit into
mainfrom
fix/skip-oversized-records
Nov 18, 2026
Merged

kiivihal merged 1 commit into
mainfrom
fix/skip-oversized-records

Conversation

@kiivihal

Copy link
Copy Markdown
Member

What

A record over elasticsearch.maxNestedDocs returned an error from Parser.process, and Parse stops the whole upload on the first error. One large record therefore kept every other record of the upload out of the index.

Parse now skips a record_too_large record: it logs a warning with the hubID and counts it in a new recordsTooLarge stat. 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. The staticcheck step panics on main as well (staticcheck v0.6.1), unrelated to this change.

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

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.95%. Comparing base (a0a7973) to head (effa823).

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              
Flag Coverage Δ
unittests 36.95% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kiivihal
kiivihal merged commit 1963737 into main Nov 18, 2026
6 checks passed
@kiivihal
kiivihal deleted the fix/skip-oversized-records branch November 18, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant