Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16218

failOnVersionConflicts not working on in-place updates

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.11.2, 9.1
    • None
    • None

    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).

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            anshum Anshum Gupta
            Idjeraoui Lamine
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m

                Slack

                  Issue deployment