Skip to content

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

Open
suddendust wants to merge 6 commits into
mainfrom
detailedBulkUpdateResponse
Open

Add DeepBulkUpdateResult to give fine-grained information to the caller about failed/successful keys in batch updates#319
suddendust wants to merge 6 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.15%. Comparing base (b381c1b) to head (cb58b8a).

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.89%   81.15%   +0.25%     
- Complexity     1580     1613      +33     
============================================
  Files           242      243       +1     
  Lines          7628     7646      +18     
  Branches        751      753       +2     
============================================
+ Hits           6171     6205      +34     
+ Misses          968      950      -18     
- Partials        489      491       +2     
Flag Coverage Δ
integration 81.15% <85.18%> (+0.25%) ⬆️
unit 57.10% <85.18%> (+1.75%) ⬆️

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   36s ⏱️ -2s
  852 tests +6    851 ✅ +6  1 💤 ±0  0 ❌ ±0 
1 189 runs  +6  1 188 ✅ +6  1 💤 ±0  0 ❌ ±0 

Results for commit cb58b8a. ± Comparison against base commit b381c1b.

♻️ This comment has been updated with latest results.

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