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

Distribute a DeleteById to all shards when using the CompositeId router with a router field defined and field value is missing in request

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

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.0
    • SolrCloud
    • None

    Description

      When issuing a DeleteById command for a collection using the CompositeId router with a router field defined and the route value is missing from the request, the DeleteById fails silently, even if it happens to have been sent to the correct shard. Instead of failing silently, the request could be forwarded to all shard leaders and from there to all replicas. Another required change is that the deletion would need to be performed even though the route value is missing. The deletion would be a no-op on the shards where the document does not exist.

      One use case for this feature is when the routing key value is volatile and you need to guarantee no duplicates exist when updating a document if it happens to change shards. Another use case is if you want to delete a document without referencing a database to retrieve the route field value.

      A work-around is to use a DeleteByQuery. However, my testing has found that DeleteById performs significantly better, even when sent to all shards. Additionally, I've found that a heavy mixed load of DeleteByQuery commands and Add commands can lead to node failures when there are multiple replicas.

      Additional comments are in SOLR-6910, however, that JIRA is specific to the implicit router and I mistakenly added them there.

       

      Attachments

        Activity

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

          People

            epugh Eric Pugh
            makosten Michael Kosten
            Votes:
            0 Vote for this issue
            Watchers:
            7 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 - 5h 40m
                5h 40m

                Slack

                  Issue deployment