Rahul Kumar created PHOENIX-8061:
------------------------------------

             Summary: PhoenixSyncTableTool skips rows after an empty or dummy 
scanner result
                 Key: PHOENIX-8061
                 URL: https://issues.apache.org/jira/browse/PHOENIX-8061
             Project: Phoenix
          Issue Type: Improvement
    Affects Versions: 5.2.3, 5.4.0, 5.3.3
            Reporter: Rahul Kumar
            Assignee: Rahul Kumar
             Fix For: 5.2.3, 5.4.0, 5.3.3


{{PhoenixSyncTableTool}} can skip rows when a lower scanner returns an empty 
result or a Phoenix dummy row in the middle of a region.

In {{{}PhoenixSyncTableRegionScanner{}}}, that result broke out of the chunk 
loop. If no real rows had been accumulated, the scanner returned {{{}false{}}}, 
which the client treats as the end of the scan. Rows after the empty or dummy 
result in that region were never hashed.

On the client, {{ChunkScannerContext.getNextChunk()}} treated an empty 
{{Result}} the same way and stopped reading further chunks.

Change
 * Log empty rows and dummy rows separately, including the region, rows and 
bytes accumulated so far, the current chunk bounds, and whether more rows 
remain.
 * When the call accumulated no real rows but the lower scanner still has more 
rows, yield the RPC ({{{}PhoenixScannerContext.setReturnImmediately{}}}) and 
return {{hasMoreRows}} so the client re-invokes the scanner instead of ending 
the scan.
 * In {{{}getNextChunk(){}}}, skip empty results and keep calling 
{{scanner.next()}} until a real chunk or a true end of scan.

Logging also now includes the table name, source and target chunk bounds, row 
counts, and source and target rows scanned during a row-level diff, so a 
mismatch can be traced back to the scan that produced it.

 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to