Tanuj Khurana created PHOENIX-8006:
--------------------------------------

             Summary: Ungrouped aggregate queries serialize on the client when 
server paging returns partial results 
                 Key: PHOENIX-8006
                 URL: https://issues.apache.org/jira/browse/PHOENIX-8006
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 5.3.2, 5.3.1, 5.2.2
            Reporter: Tanuj Khurana
            Assignee: Tanuj Khurana
         Attachments: ungrouped-aggregate-serial-drain-repro.patch, 
ungrouped-aggregate-serial-drain-rpc-trace-evidence.txt

For an ungrouped aggregate query (e.g. SELECT COUNT(*) FROM t WHERE ...) 
executed with scanner lease renewal enabled (the default, 
phoenix.scanner.lease.renew.enabled=true), the per-region scan results are 
drained serially on the client caller thread whenever the server cannot 
complete a region's aggregation within a single page-time budget. Instead of 
the regions being scanned concurrently, the query degrades to one client RPC 
per scanned page, summed sequentially across all regions. On large tables this 
turns a query that should complete in tens of seconds into one that can take 
many minutes.

All ungrouped aggregate queries (no GROUP BY) — COUNT/SUM/MIN/MAX/AVG, 
COUNT(DISTINCT ...) are affected. 

Repro
{code:java}
 # Turn trace logging phoenix-core/src/test/resources/log4j2-test.properties
 logger.rpc.name = org.apache.hadoop.hbase.ipc.AbstractRpcClient
 logger.rpc.level = TRACE {code}
 

Test in ServerPagingIT

[^ungrouped-aggregate-serial-drain-repro.patch]

Serial Execution output

[^ungrouped-aggregate-serial-drain-rpc-trace-evidence.txt]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to