[Ready] SOLR-5939: A failed merged update stream now records its error against each request in the stream #5075
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5075"
general
weight: 0.35
sarkaramrit1993
🤖 AI text below 🤖 (posted on behalf of Nick Shanin)
Ready for review, but held as a draft due to the project's open-PR cap; I'll mark it open on request.
https://issues.apache.org/jira/browse/SOLR-5939
What happens today
When a merged stream fails, the error is recorded only against the first request sent to that node.
A streaming client merges queued updates into one request stream. The client is built with the first request sent to its node, and a failed stream is recorded against that request. The distributor then judges retries and failure counts on the wrong request. For example, a delete-by-query that fails in a stream with a retriable add leaves the add with no error record, and the add is not resubmitted.
What this change does
Each request in a failed stream gets its own error, and a successful stream forgets its requests.
recordStreamedUpdate(ConcurrentUpdateBaseSolrClient.java).handleErrorcallback with its requests. The Solr client records one error per request, and the errors share the exception (StreamingSolrClients.java).protected final recordStreamedUpdate(Update)(L268-L273),protected handleError(Throwable, List<UpdateRequest>, List<String>, String)(L675-L678), andpublic onSuccess(Object, InputStream, List<UpdateRequest>)(L724-L727). The last two delegate to the older methods by default.A choice to check
Per-request attribution is a design choice. Maintainers should judge it.
The server returns one response for the whole stream, so the client cannot tell which update it rejected. This branch records the failure once per request in the stream, sharing the exception. Two other routes were considered:
Was per-request attribution the right middle call?
Proof
The focused tests pass with SOLR-5754 combined in, and the new error-attribution tests fail on base production.
7fbe0128d8b0. The merge commit is1ddbf36202d, and its tree isf2e33340f0ea. This headf8d4bdbea518is the current head and the head the combined run tested. The current SOLR-5754 head46b919e2d4e8only removes a root file. The 26 tests are:- StreamingSolrClientsErrorAttributionTest 2 of 2
- SolrCmdDistributorTest 1 of 1
- TestTolerantUpdateProcessorCloud 19 of 19
- TestTolerantUpdateProcessorRandomCloud 2 of 2
- StreamingSolrClientsTest 2 of 2. This class comes from SOLR-5754 and is not in this branch alone.
testMergedStreamErrorIsAttributedToEveryRequestInTheStreamexpects error document ids1and2.testDeleteByQueryRetryRuleIsJudgedOnItsOwnRequestexpects two errors. On base production, this class fails 2 of 2.Limits
Several effects of this change are stated here, not narrowed.
DistributedUpdatesAsyncExceptionlists each entry's message, so the same message can repeat (DistributedUpdateProcessor.java).Changelog:
changelog/unreleased/SOLR-5939.yml(type: fixed).AI assistance
AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution.