laminelam opened a new pull request, #898:
URL: https://github.com/apache/solr/pull/898

   https://issues.apache.org/jira/browse/SOLR-16218
    
   # 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).
   
    
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms 
to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to