You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2018/03/28 07:27:24 UTC

lucene-solr:branch_7x: SOLR-10734: Clone the original solr document each time we retry

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 8e06decce -> 3123218c3


SOLR-10734: Clone the original solr document each time we retry

(cherry picked from commit 3be8cfb)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3123218c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3123218c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3123218c

Branch: refs/heads/branch_7x
Commit: 3123218c30960bbb8b44bc408bdef3111cb8c048
Parents: 8e06dec
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Wed Mar 28 12:56:23 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Wed Mar 28 12:57:16 2018 +0530

----------------------------------------------------------------------
 .../apache/solr/update/processor/AtomicUpdateProcessorFactory.java  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3123218c/solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateProcessorFactory.java
index c3522f0..99cb1e1 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateProcessorFactory.java
@@ -183,6 +183,7 @@ public class AtomicUpdateProcessorFactory extends UpdateRequestProcessorFactory
           // modified fields. We don't want those absolute values because they are out-of-date due to the conflict
           // so we restore the original document created in processAdd method and set the right version on it
           cmd.solrDoc = clonedOriginalDoc;
+          clonedOriginalDoc = clonedOriginalDoc.deepCopy(); // copy again because the old cloned ref will be modified during processAdd
           cmd.solrDoc.setField(VERSION, lastVersion);
 
           processAddWithRetry(cmd, attempts, clonedOriginalDoc);