Rahul Kumar created PHOENIX-8065:
------------------------------------

             Summary: Provide option to ignore cell timestamps in 
PhoenixSyncTableTool, and sync SYSTEM.SEQUENCE
                 Key: PHOENIX-8065
                 URL: https://issues.apache.org/jira/browse/PHOENIX-8065
             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


The chunk checksum includes the cell timestamp. Tables such as 
{{SYSTEM.SEQUENCE}} are rewritten on each cluster with the same values at 
different timestamps, so a correct copy is reported as a mismatch. 
{{SYSTEM.SEQUENCE}} also cannot be synced today: the generated {{SELECT}} does 
not quote the table name, and {{SEQUENCE}} is a reserved word, so query 
planning fails.

This is needed to validate {{SYSTEM.SEQUENCE}} during an FKP migration.

Change

Add {{--exclude-cell-timestamp-from-checksum}} (off by default). When set, the 
region scanner omits the cell timestamp from the SHA-256 digest. The hash still 
covers the row key, family, qualifier, type, value, and tags. Source and target 
rows with the same data and different timestamps then compare as equal. A real 
value difference still mismatches.

Quote the schema and table in the input {{SELECT}} 
({{{}SchemaUtil.getEscapedTableName{}}}) so a name that is a Phoenix reserved 
word, including {{{}SYSTEM.SEQUENCE{}}}, parses. The job completion log 
includes the table name.

Tests
 * Timestamp-only differences verify with the flag on, and value differences 
still mismatch.
 * {{testSyncTableOnSystemSequence}} creates sequences on both clusters, 
advances one on the source, and checks that the value drift is reported.
 * Unit tests for the flag default, parsing, and digest behavior with and 
without the timestamp.



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

Reply via email to