Skip to content

Add DeepBulkUpdateResult to give fine-grained information to the caller about failed/successful keys in batch updates#319

Merged
suddendust merged 7 commits into
mainfrom
detailedBulkUpdateResponse
Jul 21, 2026
Merged

Add DeepBulkUpdateResult to give fine-grained information to the caller about failed/successful keys in batch updates#319
suddendust merged 7 commits into
mainfrom
detailedBulkUpdateResponse

Conversation

@suddendust

Copy link
Copy Markdown
Contributor

Description

The current FlatPostgresCollection#bulkUpdate API silently swallows failed batches:

        } catch (Exception e) {
          LOGGER.warn(
              "Failed to update key group (size: {}): {}",
              entry.getValue().getKeys().size(),
              e.getMessage());
          // Continue with other groups - no cross-group atomicity

There's no way for callers to know which keys failed. This PR adds DeepBulkUpdateResult that callers can use to get more fine-grained info about failed docs in bulk updates.

Testing

Added UTs

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.18519% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.04%. Comparing base (d5c2963) to head (2d49e5c).

Files with missing lines Patch % Lines
...trace/core/documentstore/DeepBulkUpdateResult.java 85.71% 0 Missing and 2 partials ⚠️
...documentstore/postgres/FlatPostgresCollection.java 84.61% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #319      +/-   ##
============================================
+ Coverage     80.90%   81.04%   +0.13%     
- Complexity     1580     1615      +35     
============================================
  Files           242      243       +1     
  Lines          7632     7650      +18     
  Branches        752      754       +2     
============================================
+ Hits           6175     6200      +25     
+ Misses          968      960       -8     
- Partials        489      490       +1     
Flag Coverage Δ
integration 81.04% <85.18%> (+0.13%) ⬆️
unit 57.12% <85.18%> (+1.80%) ⬆️

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.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

Test Results

  124 files  ±0    124 suites  ±0   35s ⏱️ -4s
  852 tests +6    851 ✅ +6  1 💤 ±0  0 ❌ ±0 
1 189 runs  +6  1 188 ✅ +6  1 💤 ±0  0 ❌ ±0 

Results for commit 2d49e5c. ± Comparison against base commit d5c2963.

♻️ This comment has been updated with latest results.

@suddendust
suddendust merged commit c534f39 into main Jul 21, 2026
7 checks passed
@suddendust
suddendust deleted the detailedBulkUpdateResponse branch July 21, 2026 18:40
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.

2 participants