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

chenglei pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x by this push:
     new 4ed30f2  PHOENIX-6287 Fix incorrect log in ParallelIterators.submitWork
4ed30f2 is described below

commit 4ed30f23c74b0409c9bd4ebe0997de95ac4fc898
Author: chenglei <cheng...@apache.org>
AuthorDate: Wed Dec 30 17:43:38 2020 +0800

    PHOENIX-6287 Fix incorrect log in ParallelIterators.submitWork
---
 .../org/apache/phoenix/iterate/ParallelIterators.java | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
index 7b1229b..88b48c0 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
@@ -123,12 +123,12 @@ public class ParallelIterators extends 
BaseResultIterators {
                 @Override
                 public PeekingResultIterator call() throws Exception {
                     long startTime = 
EnvironmentEdgeManager.currentTimeMillis();
-                    if (LOGGER.isDebugEnabled()) {
-                        LOGGER.debug(LogUtil.addCustomAnnotations("Id: " + 
scanId + ", Time: " +
-                            (EnvironmentEdgeManager.currentTimeMillis() - 
startTime) +
-                            "ms, Scan: " + scan, 
ScanUtil.getCustomAnnotations(scan)));
-                    }
-                    PeekingResultIterator iterator = 
iteratorFactory.newIterator(context, tableResultItr, scan, physicalTableName, 
ParallelIterators.this.plan);
+                    PeekingResultIterator iterator = 
iteratorFactory.newIterator(
+                            context,
+                            tableResultItr,
+                            scan,
+                            physicalTableName,
+                            ParallelIterators.this.plan);
                     if (initFirstScanOnly) {
                         if ((!isReverse && scanLocation.isFirstScan()) || 
(isReverse && scanLocation.isLastScan())) {
                             // Fill the scanner's cache. This helps reduce 
latency since we are parallelizing the I/O needed.
@@ -137,6 +137,13 @@ public class ParallelIterators extends BaseResultIterators 
{
                     } else {
                         iterator.peek();
                     }
+
+                    if (LOGGER.isDebugEnabled()) {
+                        LOGGER.debug(LogUtil.addCustomAnnotations("Id: " + 
scanId + ", Time: " +
+                            (EnvironmentEdgeManager.currentTimeMillis() - 
startTime) +
+                            "ms, Scan: " + scan, 
ScanUtil.getCustomAnnotations(scan)));
+                    }
+
                     allIterators.add(iterator);
                     return iterator;
                 }

Reply via email to