Эволюция схем данных без простоя: модель совместимости и практики миграций баз данных (расширение–сокращение, двойная запись)
Дмитрий Владимирович Налимов, Богдан Денисович Терёхин, Вадим Сергеевич Яшин · Stroitelʹnye i dorožnye mašiny · 2025
The article examines the evolution of data schemas in relational and NoSQL stores under requirements of continuous service availability typical for distributed high-load systems. It is shown that database inertia, the need for strong consistency, and the simultaneous coexistence of multiple versions of applications and schemas during a transition period impose constraints on the use of blocking DDL operations and increase the importance of forward and backward compatibility models. Based on controlled migrations in PostgreSQL 13–15 and MySQL 8.0 with profiling of latency (p95/p99), TPS, CPU load, IOPS, and logging volume, differences are demonstrated between standard and online changes, external shadow-copying tools, and the expand–contract approach. Quantitative results show that expand–contract virtually eliminates blocking when adding columns compared to standard DDL, whereas copying techniques reduce blocking at the cost of a sharp increase in disk activity. The costs of dual writes are analyzed separately: a synchronous scheme leads to a noticeable decrease in throughput and an increase in latency, while an asynchronous scheme results in less degradation but introduces a measurable risk of inconsistency that requires compensatory procedures. A significant contribution is the comparison of rollback scenarios: evolutionary practices provide almost instantaneous recovery and minimization of lost requests, in contrast to classical migrations. The material makes it possible to assess the relevance of the proposed compatibility model for infrastructure capacity planning and for selecting a migration strategy depending on the load profile and acceptable consistency risks.
Cited by 0 works.