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

Do not clone SolrInputDocument if update processor chain does not contain custom processors

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3, master (7.0)
    • Component/s: SolrCloud
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      In SOLR-3215 we started cloning documents before adding them locally and send the cloned copy to replicas. This was done because processors after DistributedUpdateProcessor can affect the docs before they are sent to the replicas.

      However, we can avoid the deep copy if we know for sure that the processors after DUP are one of (LogUpdateProcessor, RunUpdateProcessor, TolerantUpdateProcessor) which definitely do not modify the document. This ensures that the common case is optimized.

      1. SOLR-9447.patch
        2 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Patch which looks at the chain in the constructor of DUP and figures out if the subsequent processors are one of LogUpdateProcessor, RunUpdateProcessor or TolerantUpdateProcessor. If not, it enables cloning of the SolrInputDocument.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Patch which looks at the chain in the constructor of DUP and figures out if the subsequent processors are one of LogUpdateProcessor, RunUpdateProcessor or TolerantUpdateProcessor. If not, it enables cloning of the SolrInputDocument.
        Hide
        dsmiley David Smiley added a comment -

        +1. Say why was it cloning it twice?

        Show
        dsmiley David Smiley added a comment - +1. Say why was it cloning it twice?
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Say why was it cloning it twice?

        It doesn't. We clone only once before adding locally and send that clone to the replicas.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Say why was it cloning it twice? It doesn't. We clone only once before adding locally and send that clone to the replicas.
        Hide
        dsmiley David Smiley added a comment -

        Oh; right I misread the diff.

        Show
        dsmiley David Smiley added a comment - Oh; right I misread the diff.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 26262f4074d43c3167efcfb83452daf081b0d9b9 in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=26262f4 ]

        SOLR-9447: Do not clone SolrInputDocument if update processor chain does not contain custom processors.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 26262f4074d43c3167efcfb83452daf081b0d9b9 in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=26262f4 ] SOLR-9447 : Do not clone SolrInputDocument if update processor chain does not contain custom processors.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 65c2cf3a0a260d571d0da7c50fb8295f1473b9a3 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=65c2cf3 ]

        SOLR-9447: Do not clone SolrInputDocument if update processor chain does not contain custom processors.
        (cherry picked from commit 26262f4)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 65c2cf3a0a260d571d0da7c50fb8295f1473b9a3 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=65c2cf3 ] SOLR-9447 : Do not clone SolrInputDocument if update processor chain does not contain custom processors. (cherry picked from commit 26262f4)
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Closing after 6.3.0 release.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Closing after 6.3.0 release.

          People

          • Assignee:
            shalinmangar Shalin Shekhar Mangar
            Reporter:
            shalinmangar Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development