Repository navigation
SOLR-6973: A partial update with no signature fields no longer gets an empty signature, which can delete unrelated documents - #5079
Open
nick-boss-tech wants to merge 6 commits into
Conversation
…nature fields Hypothetical, unrun regression test; see SOLR-6973-TESTING.md.
nick-boss-tech
marked this pull request as ready for review
October 9, 2026 23:26
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Determine whether a signature field is present before constructing and initializing the signature implementation.
1 open finding
What changed in this PR
This pull request prevents partial updates without signature fields from generating an empty deduplication signature.
Changes:
- Bypasses signature generation for unaffected partial updates.
- Adds regression coverage.
- Adds a SOLR-6973 changelog entry.
| File | Description |
|---|---|
solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java |
Verifies pass-through behavior without a signature or update term. |
solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java |
Skips signature assignment for eligible partial updates. |
changelog/unreleased/SOLR-6973-signature-partial-update.yml |
Documents the fix. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
janhoy
approved these changes
Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🤖 AI text below 🤖 (posted on behalf of Nick Shanin)
https://issues.apache.org/jira/browse/SOLR-6973
What happens today
With
overwriteDupes, a partial update with no signature fields can delete unrelated documents.With a
fieldslist, the processor's loop throws only if a signature field is present in the partial update. A partial update that sets other fields passes the loop with an empty signature. The processor writes that signature tosignatureFieldand setsupdateTermto it (SignatureUpdateProcessorFactory.java).updateDocumentsdeletes every document that matchesupdateTerm(DirectUpdateHandler2.java).What this change does
A partial update with no signature fields skips the signature step.
It goes to the next processor unchanged. Partial updates with a signature field still fail, and requests without
fieldsstill reject partial updates (SignatureUpdateProcessorFactory.java).Behavior change: a partial update that creates a new document now stores it without
signatureField. The old code gave it the shared empty signature, which caused the collision.Proof
The new test fails on the base code and passes with this change.
The test is SignatureUpdateProcessorFactoryTest.java. It checks that
signatureFieldis absent andupdateTermis null. On the base production code, the same class ran 7 tests with 1 failure. The failure is the new test: the base code sets both values it checks for absence.With this change, the focused
SignatureUpdateProcessorFactoryTestran 7 of 7, verified 2026-10-09 at head51fcd05e695. The head includes a review fix that decides the partial-update outcome before the signature class is constructed; the same 7 tests and the same base failure were re-verified at that head. The core module checks also pass.A choice to check
The update passes through. The other option is to reject it.
The no-
fieldssetup already rejects partial updates with an error. This change passes them through, so the update works and no signature is stored. Rejecting would make the failure visible but would stop the update. Was pass-through the right call?Limits
The reporter's 5% symptom is not shown to come from this path.
The ticket comments suggest shard routing. This change removes one collision path. It does not show that the path explains the report. The effect on new documents was checked by reading only. A follow-up submission is planned if the shard-routing path is confirmed as the cause of the reported symptom.
Changelog:
changelog/unreleased/SOLR-6973-signature-partial-update.ymlAI assistance
AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution.