WANG Xuemei, ZHANG Shaobo. The Improvement and Application of Online Schema Change[J]. Experiment Science and Technology, 2016, 14(6): 67-72. DOI: 10.3969/j.issn.1672-4550.2016.06.019
Citation: WANG Xuemei, ZHANG Shaobo. The Improvement and Application of Online Schema Change[J]. Experiment Science and Technology, 2016, 14(6): 67-72. DOI: 10.3969/j.issn.1672-4550.2016.06.019

The Improvement and Application of Online Schema Change

  • To solve the business blocking problem caused by DDL operation in MySQL database, an online schema change (OSC) method is implemented with non-blocking operation in reading and writing transactions.Considering the availability requirement of the electronic commerce database on the read and write transaction, OSC system divides atomic DDL statements into several successive steps, creates a temporary ghost table to make a copy of all data from the original table fragment by fragment, and adopts triggers to ensure data consistency incrementally, so as to realize schema change with non-lock and solve the problem of business long time blocking.In addition, aiming at solving the problems of the OSC system encountered in practical applications, a series of solutions are presented, such as pre-detection, concurrency execution prevention etc.Moreover, combined with the Taobao‘s database architecture, the analysis on the OSC‘s application in complex business scenarios is provided.
  • loading

Catalog

    Turn off MathJax
    Article Contents

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return