Flexview CDC Implementation

This CDC utility identifies row changes in the database, and takes few action on them like writing them to a log file table or file. In order to update views incrementally, Flexviews needs to have detailed information of each row where change is made in the database. FlexCDC reads MySql binary logs, which tracks those row changes .

1. FlexCDC triggers MySqlbinlog in an external procedure with the following commandline options ‘–base64-output=decode-rows -v’. This tells the utility to transform RBR base64 entries into readable SBR notation.

2. Then MySqlbinlog connects to database-MySql and queries for binary logs. The output from MySqlbinlog is stored by FlexCDC and proceeds.

3. FlexCDC gathers the changes into log tables rather than applying the actual changes. FlexCDC assigns a unique sequentially increasing transaction id to every set of changes made. FlexCDC inserts every set of changes into one table change logs or more than one table change logs (one per changed table) as a single transaction.

image

Figure 2.5 Flexview CDC Flowchart


Note: FlexCDC do not replace MySql replication. However there is an experimental class called FlexSBR which involves support for replication of SBR binary logs. It is mainly a proof-of-concept. It does not work with RBR.

Leave a Reply