Description
Description
Fix a bug in in-place update when failOnVersionConflicts=false.
When sending in-place/atomic updates for a non-existent doc with _version=1_ Solr throws 409 error even if failOnVersionConflicts is set to false.
Steps to Reproduce
- Send an update request (single or batch) that includes Update in-place/atomic command of a non-existent doc.
- Set Version=1
- Solr will throw 409 exception with "Document not found for update" message error.
Set failOnVersionConflicts=false
- Solr still throws the same error.
Expected
if failOnVersionConflicts=false Solr should ignore the error silently and continue processing the rest of the commands.
Actual Result
Solr throws 409 exception with "Document not found for update" message error.
Solution
Check in getUpdatedDocument if failOnVersionConflicts=true before throwing the exception.
Tests
Added test cases catching the expected behavior when _failOnVersionConflicts is set to true or false (default is true).