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:25:29 UTC

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

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

 ##########
 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 don't want this message printed every 100ms. I think we should print it every 1/10th of the total time (so, every minute if we are waiting for 10 minutes) or every second, whichever is larger.
   
   Can you change the waitForCondition accodingly?
   
   If we do this, we can also print more stuff (e.g. which segments are loaded)

----------------------------------------------------------------
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