You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/10/21 22:41:11 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #4729: Adding logs for "waitForAllDocsLoaded"

jackjlli commented on a change in pull request #4729: Adding logs for "waitForAllDocsLoaded"
URL: https://github.com/apache/incubator-pinot/pull/4729#discussion_r337271702
 
 

 ##########
 File path: pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java
 ##########
 @@ -364,18 +367,32 @@ protected long getCurrentCountStarResult()
    * @param timeoutMs Timeout in milliseconds
    * @throws Exception
    */
-  protected void waitForAllDocsLoaded(long timeoutMs)
-      throws Exception {
+  protected void waitForAllDocsLoaded(long timeoutMs) throws Exception {
     final long countStarResult = getCountStarResult();
     TestUtils.waitForCondition(new Function<Void, Boolean>() {
       @Nullable
       @Override
       public Boolean apply(@Nullable Void aVoid) {
+        long currentResult;
         try {
-          return getCurrentCountStarResult() == countStarResult;
+          currentResult = getCurrentCountStarResult();
         } catch (Exception e) {
           return null;
         }
+
+        // Add more information to logs
+        if (currentResult == countStarResult) {
+          return true;
+        } else if (currentResult < countStarResult) {
+          LOGGER.info("Docs are not fully loaded yet (current: {}, expected: {})", currentResult, countStarResult);
 
 Review comment:
   We disable info-level logging in our Travis CI setting. So in Travis it should be fine. The only concern is the place where info level logging is enabled.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org