Repository navigation
Retain bulk write replies when execution throws - #157
Conversation
Expose an optional owned BSON output before propagating the driver error, including through collection sessions. AI disclosure: This work was prepared with assistance from OpenAI Codex.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #157 +/- ##
==========================================
+ Coverage 84.20% 84.71% +0.51%
==========================================
Files 11 11
Lines 1652 1655 +3
==========================================
+ Hits 1391 1402 +11
+ Misses 261 253 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Merged as 1125734. The merge has exactly the reviewed and tested source tree. All 20 PR/push CI jobs and all 10 merged-master jobs passed. This includes every actual nightly suite and the Windows initialization checks. All 18 head and nine main coverage uploads were accepted for the correct repository and commit; every distinct report finished processing, with 84.71% aggregate coverage at both commits. The hosted API documentation now describes the optional reply reference, partial success, zero-based write-error indices, and reply lifetime. The page returns HTTP 200, and every Julia source link points to the merged commit. The real MongoDB minimum/current regressions and complete suites passed before publication. No package release was made. AI disclosure: This work was prepared with assistance from OpenAI Codex. |
An unordered bulk insert can save valid documents and still throw
BSONErrorfor a duplicate key. The current API discards the driver reply, so callers cannot inspect the saved count or identify the failed input. Add an optionalreply=Ref{Mongoc.BSON}()output toexecute!and both collection forms ofinsert_many. Populate it before propagating the existing error, and keep the reply alive after the bulk handle is released.The existing success result and thrown error types stay the same. The reference is unchanged when execution is rejected before calling the driver. Document partial success, zero-based write-error indices, empty failure replies, and reply ownership. No dependencies, exports, versions, or workflow changes are included.
Validation:
git diff --checkpasses. All 20 hosted CI jobs pass across the push and PR workflows, including 18 actual native suites and all nightly lanes. Each exact repository/SHA upload was accepted, and all 18 distinct coverage reports are fully processed at 84.71%. Both Codecov checks pass.1125734a1d65a7cf482d75bcbc3dba0d97be3050, with the identical reviewed source tree. All 10 merged-master CI jobs pass, including nine native lanes and every nightly lane. All nine correct-commit coverage reports are accepted and fully processed at 84.71%. The hosted API page returns HTTP 200, documents both reply methods, and every Julia source link points to this merge. No package release was made.Fixes #118.
Co-authored by Codex
AI disclosure: This work was prepared with assistance from OpenAI Codex.