You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2017/01/03 22:44:47 UTC

[1/6] lucene-solr:branch_6x: tests: bump up fudge

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x cbf96e0d7 -> a8dd2af4e


tests: bump up fudge


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

Branch: refs/heads/branch_6x
Commit: 7eebe5dadc3b4623b283f26730b7418e3e1f67f4
Parents: cbf96e0
Author: markrmiller <ma...@apache.org>
Authored: Thu Dec 29 05:40:45 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Jan 3 17:36:19 2017 -0500

----------------------------------------------------------------------
 solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7eebe5da/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java b/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
index 4106884..c9c9691 100644
--- a/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
+++ b/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
@@ -107,7 +107,7 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase {
     monitor.assertSaneOffers();
 
     // Wait for the soft commit with some fudge
-    Long soft529 = monitor.soft.poll(softCommitWaitMillis * 2, MILLISECONDS);
+    Long soft529 = monitor.soft.poll(softCommitWaitMillis * 3, MILLISECONDS);
     assertNotNull("soft529 wasn't fast enough", soft529);
     monitor.assertSaneOffers();
 


[4/6] lucene-solr:branch_6x: tests: bump timeout

Posted by ma...@apache.org.
tests: bump timeout


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

Branch: refs/heads/branch_6x
Commit: 307db446e4b8b876255bc069cad1fc79eb1d7e0f
Parents: 974f3f7
Author: markrmiller <ma...@apache.org>
Authored: Thu Dec 29 05:59:25 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Jan 3 17:37:11 2017 -0500

----------------------------------------------------------------------
 .../org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/307db446/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
index 0436d5e..382ef32 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
@@ -157,7 +157,7 @@ public class LeaderFailoverAfterPartitionTest extends HttpPartitionTest {
     
     proxy0.reopen();
     
-    long timeout = System.nanoTime() + TimeUnit.NANOSECONDS.convert(60, TimeUnit.SECONDS);
+    long timeout = System.nanoTime() + TimeUnit.NANOSECONDS.convert(90, TimeUnit.SECONDS);
     while (System.nanoTime() < timeout) {
       List<Replica> activeReps = getActiveOrRecoveringReplicas(testCollectionName, "shard1");
       if (activeReps.size() >= 2) break;


[5/6] lucene-solr:branch_6x: tests: speed up very slow test

Posted by ma...@apache.org.
tests: speed up very slow test


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

Branch: refs/heads/branch_6x
Commit: 3942c42a7f6dfaf8ed31373ff0cab8e53295a3ab
Parents: 307db44
Author: markrmiller <ma...@apache.org>
Authored: Wed Dec 28 08:36:08 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Jan 3 17:37:25 2017 -0500

----------------------------------------------------------------------
 .../apache/solr/cloud/CdcrBootstrapTest.java    | 25 ++++++++++----------
 1 file changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3942c42a/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java b/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
index aca5e0b..6959bd8 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
@@ -76,11 +76,11 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
             .withProperty("solr.directoryFactory", "solr.StandardDirectoryFactory")
             .process(source.getSolrClient());
 
-        // index 10000 docs with a hard commit every 1000 documents
         CloudSolrClient sourceSolrClient = source.getSolrClient();
         sourceSolrClient.setDefaultCollection("cdcr-source");
+        int docs = (TEST_NIGHTLY ? 100 : 10);
         int numDocs = 0;
-        for (int k = 0; k < 100; k++) {
+        for (int k = 0; k < docs; k++) {
           UpdateRequest req = new UpdateRequest();
           for (; numDocs < (k + 1) * 100; numDocs++) {
             SolrInputDocument doc = new SolrInputDocument();
@@ -89,7 +89,7 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
             req.add(doc);
           }
           req.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
-          System.out.println("Adding 100 docs with commit=true, numDocs=" + numDocs);
+          System.out.println("Adding " + docs + " docs with commit=true, numDocs=" + numDocs);
           req.process(sourceSolrClient);
         }
 
@@ -170,11 +170,11 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
             .withProperty("solr.directoryFactory", "solr.StandardDirectoryFactory")
             .process(source.getSolrClient());
 
-        // index 10000 docs with a hard commit every 1000 documents
         CloudSolrClient sourceSolrClient = source.getSolrClient();
         sourceSolrClient.setDefaultCollection("cdcr-source");
+        int docs = (TEST_NIGHTLY ? 100 : 10);
         int numDocs = 0;
-        for (int k = 0; k < 100; k++) {
+        for (int k = 0; k < docs; k++) {
           UpdateRequest req = new UpdateRequest();
           for (; numDocs < (k + 1) * 100; numDocs++) {
             SolrInputDocument doc = new SolrInputDocument();
@@ -183,7 +183,7 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
             req.add(doc);
           }
           req.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
-          System.out.println("Adding 100 docs with commit=true, numDocs=" + numDocs);
+          System.out.println("Adding " + docs + " docs with commit=true, numDocs=" + numDocs);
           req.process(sourceSolrClient);
         }
 
@@ -209,7 +209,7 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
         cdcrDisableBuffer(sourceSolrClient);
 
         int c = 0;
-        for (int k = 0; k < 100; k++) {
+        for (int k = 0; k < 10; k++) {
           UpdateRequest req = new UpdateRequest();
           for (; c < (k + 1) * 100; c++, numDocs++) {
             SolrInputDocument doc = new SolrInputDocument();
@@ -256,11 +256,11 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
             .withProperty("solr.directoryFactory", "solr.StandardDirectoryFactory")
             .process(source.getSolrClient());
 
-        // index 10000 docs with a hard commit every 1000 documents
         CloudSolrClient sourceSolrClient = source.getSolrClient();
         sourceSolrClient.setDefaultCollection("cdcr-source");
+        int docs = (TEST_NIGHTLY ? 100 : 10);
         int numDocs = 0;
-        for (int k = 0; k < 100; k++) {
+        for (int k = 0; k < docs; k++) {
           UpdateRequest req = new UpdateRequest();
           for (; numDocs < (k + 1) * 100; numDocs++) {
             SolrInputDocument doc = new SolrInputDocument();
@@ -269,7 +269,7 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
             req.add(doc);
           }
           req.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
-          System.out.println("Adding 100 docs with commit=true, numDocs=" + numDocs);
+          System.out.println("Adding " + docs + " docs with commit=true, numDocs=" + numDocs);
           req.process(sourceSolrClient);
         }
 
@@ -286,9 +286,8 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
 
         cdcrStart(targetSolrClient);
         cdcrStart(sourceSolrClient);
-
         int c = 0;
-        for (int k = 0; k < 100; k++) {
+        for (int k = 0; k < docs; k++) {
           UpdateRequest req = new UpdateRequest();
           for (; c < (k + 1) * 100; c++, numDocs++) {
             SolrInputDocument doc = new SolrInputDocument();
@@ -297,7 +296,7 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
             req.add(doc);
           }
           req.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
-          System.out.println("Adding 100 docs with commit=true, numDocs=" + numDocs);
+          System.out.println("Adding " + docs + " docs with commit=true, numDocs=" + numDocs);
           req.process(sourceSolrClient);
         }
 


[3/6] lucene-solr:branch_6x: tests: raise commit time to avoid false fails

Posted by ma...@apache.org.
tests: raise commit time to avoid false fails


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

Branch: refs/heads/branch_6x
Commit: 974f3f73a6275f65bdd77a58544c55fb93e45d34
Parents: 90902a6
Author: markrmiller <ma...@apache.org>
Authored: Thu Dec 29 05:53:51 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Jan 3 17:36:57 2017 -0500

----------------------------------------------------------------------
 solr/core/src/test/org/apache/solr/update/AutoCommitTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/974f3f73/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java b/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java
index cefc89c..c03c6f6 100644
--- a/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java
+++ b/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java
@@ -239,7 +239,7 @@ public class AutoCommitTest extends AbstractSolrTestCase {
     CommitTracker tracker = updater.softCommitTracker;
     // too low of a number can cause a slow host to commit before the test code checks that it
     // isn't there... causing a failure at "shouldn't find any"
-    tracker.setTimeUpperBound(1000);
+    tracker.setTimeUpperBound(1500);
     tracker.setDocsUpperBound(-1);
     // updater.commitCallbacks.add(trigger);
     


[6/6] lucene-solr:branch_6x: tests: speed up non nightly run

Posted by ma...@apache.org.
tests: speed up non nightly run


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

Branch: refs/heads/branch_6x
Commit: a8dd2af4e508d0a5842ffbd973df67149f57252c
Parents: 3942c42
Author: markrmiller <ma...@apache.org>
Authored: Thu Dec 29 06:42:14 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Jan 3 17:37:40 2017 -0500

----------------------------------------------------------------------
 solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a8dd2af4/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java b/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java
index 80b717e..52ab3a3 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java
@@ -132,7 +132,7 @@ public class TestStressLiveNodes extends SolrCloudTestCase {
   public void testStress() throws Exception {
 
     // do many iters, so we have "bursts" of adding nodes that we then check
-    final int numIters = atLeast(1000);
+    final int numIters = atLeast(TEST_NIGHTLY ? 1000 : 100);
     for (int iter = 0; iter < numIters; iter++) {
 
       // sanity check that ZK says there is in fact 1 live node


[2/6] lucene-solr:branch_6x: SOLR-9901: Implement move in HdfsDirectoryFactory.

Posted by ma...@apache.org.
SOLR-9901: Implement move in HdfsDirectoryFactory.


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

Branch: refs/heads/branch_6x
Commit: 90902a610ba724c7f02096b167cfb921e383789c
Parents: 7eebe5d
Author: markrmiller <ma...@apache.org>
Authored: Wed Dec 28 16:16:14 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Jan 3 17:36:35 2017 -0500

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  2 ++
 .../apache/solr/core/HdfsDirectoryFactory.java  | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/90902a61/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 8cb645c..283e47b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -252,6 +252,8 @@ Bug Fixes
 * SOLR-9859: replication.properties cannot be updated after being written and neither replication.properties or 
   index.properties are durable in the face of a crash. (Pushkar Raste, Chris de Kok, Cao Manh Dat, Mark Miller)
 
+* SOLR-9901: Implement move in HdfsDirectoryFactory. (Mark Miller)
+
 Other Changes
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/90902a61/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java
index d481e03..e1e3d6e 100644
--- a/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java
@@ -37,6 +37,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.PathFilter;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.LockFactory;
 import org.apache.lucene.store.NRTCachingDirectory;
 import org.apache.lucene.store.NoLockFactory;
@@ -577,4 +578,23 @@ public class HdfsDirectoryFactory extends CachingDirectoryFactory implements Sol
     FileContext fileContext = FileContext.getFileContext(getConf());
     fileContext.rename(new Path(hdfsDirPath + "/" + fileName), new Path(hdfsDirPath + "/" + toName), Options.Rename.OVERWRITE);
   }
+  
+  @Override
+  public void move(Directory fromDir, Directory toDir, String fileName, IOContext ioContext) throws IOException {
+    
+    Directory baseFromDir = getBaseDir(fromDir);
+    Directory baseToDir = getBaseDir(toDir);
+    
+    if (baseFromDir instanceof HdfsDirectory && baseToDir instanceof HdfsDirectory) {
+      Path dir1 = ((HdfsDirectory) baseFromDir).getHdfsDirPath();
+      Path dir2 = ((HdfsDirectory) baseToDir).getHdfsDirPath();
+      Path file1 = new Path(dir1, fileName);
+      Path file2 = new Path(dir2, fileName);
+      FileContext fileContext = FileContext.getFileContext(getConf());
+      fileContext.rename(file1, file2);
+      return;
+    }
+
+    super.move(fromDir, toDir, fileName, ioContext);
+  }
 }