You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/12/20 00:33:29 UTC

[lucene-solr] branch branch_8x updated: SOLR-14128: SystemCollectionCompatTest - increase logging to aid in debuging future (jenkins) failures

This is an automated email from the ASF dual-hosted git repository.

hossman pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 22fe38f  SOLR-14128: SystemCollectionCompatTest - increase logging to aid in debuging future (jenkins) failures
22fe38f is described below

commit 22fe38f060308ca84f4e37d2d1ec63a7364ce2be
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Thu Dec 19 17:14:56 2019 -0700

    SOLR-14128: SystemCollectionCompatTest - increase logging to aid in debuging future (jenkins) failures
    
    (cherry picked from commit bc2770ebb834b2871117b22f16f9b432787d4f82)
---
 .../apache/solr/cloud/SystemCollectionCompatTest.java    | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java b/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java
index d3775ab..a37c791 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java
@@ -124,6 +124,7 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {
 
   @After
   public void doAfter() throws Exception {
+    log.info("doAfter: deleting all collections...");
     cluster.deleteAllCollections();
 
     if (null != solrClient) {
@@ -149,14 +150,13 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {
     CollectionAdminResponse adminResponse = status.process(solrClient);
     NamedList<Object> response = adminResponse.getResponse();
     String leader = (String) response.get("leader");
+    log.info("Overseer Status indicates that the overseer is: {}");
     JettySolrRunner overseerNode = null;
-    int index = -1;
     List<JettySolrRunner> jettySolrRunners = cluster.getJettySolrRunners();
     for (int i = 0; i < jettySolrRunners.size(); i++) {
       JettySolrRunner runner = jettySolrRunners.get(i);
       if (runner.getNodeName().equals(leader)) {
         overseerNode = runner;
-        index = i;
         break;
       }
     }
@@ -167,13 +167,16 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {
     watcher.reset();
 
     // restart Overseer to trigger the back-compat check
-    cluster.stopJettySolrRunner(index);
+    log.info("Stopping Overseer Node: {} ({})", overseerNode.getNodeName(), overseerNode.getLocalPort());
+    cluster.stopJettySolrRunner(overseerNode);
+    log.info("Waiting for new overseer election...");
     TimeOut timeOut = new TimeOut(30, TimeUnit.SECONDS, cloudManager.getTimeSource());
     while (!timeOut.hasTimedOut()) {
       adminResponse = status.process(solrClient);
       response = adminResponse.getResponse();
       String newLeader = (String) response.get("leader");
       if (newLeader != null && !leader.equals(newLeader)) {
+        log.info("...new overseer is: {}", newLeader);
         break;
       }
       timeOut.sleep(200);
@@ -185,6 +188,9 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {
     TimeOut timeOut1 = new TimeOut(60, TimeUnit.SECONDS, cloudManager.getTimeSource());
     boolean foundWarning = false;
     boolean foundSchemaWarning = false;
+
+    // TODO: replace this polling logic with a LogWatcher that uses a queue we can await() on...
+    log.info("Polling for log watcher to detect expected log messages...");
     while (!timeOut1.hasTimedOut()) {
       timeOut1.sleep(1000);
       SolrDocumentList history = watcher.getHistory(-1, null);
@@ -193,9 +199,11 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {
           continue;
         }
         if (doc.getFieldValue("message").toString().contains("re-indexing")) {
+          log.info("Found re-indexing message: {}", doc.getFieldValue("message"));
           foundWarning = true;
         }
         if (doc.getFieldValue("message").toString().contains("timestamp")) {
+          log.info("Found timestamp message: {}", doc.getFieldValue("message"));
           foundSchemaWarning = true;
         }
       }
@@ -203,9 +211,9 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {
         break;
       }
     }
+    log.info("Done polling log watcher: foundWarning={} foundSchemaWarning={}", foundWarning, foundSchemaWarning);
     assertTrue("re-indexing warning not found", foundWarning);
     assertTrue("timestamp field incompatibility warning not found", foundSchemaWarning);
-
   }
 
 }