You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mk...@apache.org on 2018/02/06 19:28:45 UTC

lucene-solr:branch_7x: Revert "SOLR-11459: Fix in-place nonexistent doc update following existing doc update"

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 76d94c19b -> 2c2a03f01


Revert "SOLR-11459: Fix in-place nonexistent doc update following existing doc update"

This reverts commit 76d94c19bb8f6480ec0119ad77d6601432b7099b.


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

Branch: refs/heads/branch_7x
Commit: 2c2a03f01d9a2fbbd7031d3f15a971b5aeb0c598
Parents: 76d94c1
Author: Mikhail Khludnev <mk...@apache.org>
Authored: Tue Feb 6 22:26:02 2018 +0300
Committer: Mikhail Khludnev <mk...@apache.org>
Committed: Tue Feb 6 22:26:02 2018 +0300

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  3 --
 .../apache/solr/update/AddUpdateCommand.java    |  1 -
 .../solr/update/TestInPlaceUpdatesDistrib.java  | 40 --------------------
 3 files changed, 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2c2a03f0/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 08a1836..2b240a3 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -166,9 +166,6 @@ Bug Fixes
 * SOLR-11661: New HDFS collection reuses unremoved data from a deleted HDFS collection with same name causes
   inconsistent view of documents (Cao Manh Dat, shalin)
 
-* SOLR-11459: In-place update of nonexistent doc following existing doc update fails to create the doc.
-  (Andrey Kudryavtsev via Mikhail Khludnev)
-
 Optimizations
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2c2a03f0/solr/core/src/java/org/apache/solr/update/AddUpdateCommand.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/AddUpdateCommand.java b/solr/core/src/java/org/apache/solr/update/AddUpdateCommand.java
index 3bfe934..cb1af9a 100644
--- a/solr/core/src/java/org/apache/solr/update/AddUpdateCommand.java
+++ b/solr/core/src/java/org/apache/solr/update/AddUpdateCommand.java
@@ -78,7 +78,6 @@ public class AddUpdateCommand extends UpdateCommand implements Iterable<Document
      updateTerm = null;
      isLastDocInBatch = false;
      version = 0;
-     prevVersion = -1;
    }
 
    public SolrInputDocument getSolrInputDocument() {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2c2a03f0/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java
index d01d68f..14f0a7c 100644
--- a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java
+++ b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java
@@ -144,7 +144,6 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase {
     outOfOrderUpdatesIndividualReplicaTest();
     delayedReorderingFetchesMissingUpdateFromLeaderTest();
     updatingDVsInAVeryOldSegment();
-    updateExistingThenNonExistentDoc();
 
     // TODO Should we combine all/some of these into a single test, so as to cut down on execution time?
     reorderedDBQIndividualReplicaTest();
@@ -412,45 +411,6 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase {
     log.info("updatingDVsInAVeryOldSegment: This test passed fine...");
   }
 
-
-  /**
-   * Test scenario:
-   * <ul>
-   *   <li>Send a batch of documents to one node</li>
-   *   <li>Batch consist of an update for document which is existed and an update for documents which is not existed </li>
-   *   <li>Assumption which is made is that both updates will be applied: field for existed document will be updated,
-   *   new document will be created for a non existed one</li>
-   * </ul>
-   *
-   */
-  private void updateExistingThenNonExistentDoc() throws Exception {
-    clearIndex();
-    index("id", 1, "inplace_updatable_float", "1", "title_s", "newtitle");
-    commit();
-    SolrInputDocument existingDocUpdate = new SolrInputDocument();
-    existingDocUpdate.setField("id", 1);
-    existingDocUpdate.setField("inplace_updatable_float", map("set", "50"));
-
-    SolrInputDocument nonexistentDocUpdate = new SolrInputDocument();
-    nonexistentDocUpdate.setField("id", 2);
-    nonexistentDocUpdate.setField("inplace_updatable_float", map("set", "50"));
-    
-    SolrInputDocument docs[] = new SolrInputDocument[] {existingDocUpdate, nonexistentDocUpdate};
-
-    SolrClient solrClient = clients.get(random().nextInt(clients.size()));
-    add(solrClient, null, docs);
-    commit();
-    for (SolrClient client: new SolrClient[] {LEADER, NONLEADERS.get(0), NONLEADERS.get(1)}) {
-      for (SolrInputDocument expectDoc : docs) {
-        String docId = expectDoc.getFieldValue("id").toString();
-        SolrDocument actualDoc = client.getById(docId);
-        assertNotNull("expected to get doc by id:" + docId, actualDoc);
-        assertEquals("expected to update "+actualDoc, 
-            50.0f, actualDoc.get("inplace_updatable_float"));
-      }
-    }
-  }
-
   /**
    * Retries the specified 'req' against each SolrClient in "clients" untill the expected number of 
    * results are returned, at which point the results are verified using assertDocIdsAndValuesInResults