Tagged articles
double-write
12 articles · Page 1 of 1
This article details the design and implementation of a custom database sharding component built on MyBatis plugin architecture, covering sharding strategies, read/write policies (double-write/double-read), SQL parsing and rewriting for COUNT/SUM/ORDER BY, routing algorithms with distributed locks, parameter mapping handling, and solutions to migration challenges like ORDER BY alias errors and aggregate query merging.
Distributed LockMyBatis pluginSQL rewriting
0 likes · 25 min read

The article analyzes a JD interview question on scaling a MySQL order table from 100 million to billions of rows, detailing four practical expansion strategies—stop‑service migration, double‑write migration, ShardingSphere middleware, and dual‑VIP routing—each with step‑by‑step procedures, code samples, risk assessments, and validation methods to enable near‑instant capacity growth without service interruption.
Horizontal ShardingMySQLShardingSphere
0 likes · 42 min read

This article explains MySQL InnoDB's ACID properties in depth, detailing how atomicity relies on Redo and Undo logs, how consistency ensures business logic integrity, how isolation uses locks and MVCC with snapshot and current reads, and how durability is achieved through Redo logs, the innodb_flush_log_at_trx_commit setting, and the Double Write mechanism.
ACIDInnoDBMySQL
0 likes · 11 min read

The article details how the vivo Game Center’s appointment service migrated billions of rows to a dedicated MySQL database with zero‑downtime by implementing a double‑write strategy via a custom MyBatis interceptor that mirrors updates and queries to the new database, handling full and incremental sync, primary‑key consistency, transaction limits, and final cut‑over steps.
MyBatisMySQLdata migration
0 likes · 19 min read

This article details the background, requirements, and evaluation of migration options for the appointment service, explains why a double‑write approach with a custom MyBatis plugin was chosen, and walks through the full‑sync, incremental sync, code refactoring, plugin implementation, switch‑over procedures, and post‑migration validation to achieve reliable data isolation and system stability.
Database MigrationJavaMyBatis
0 likes · 17 min read

The article details a zero‑downtime migration of a high‑traffic reservation service from a shared MySQL instance to an isolated database by employing a double‑write strategy implemented through a custom MyBatis plugin, covering full and incremental sync, consistency verification, traffic shifting, and key lessons on primary‑key handling and asynchronous write side‑effects.
MyBatisMySQLSynchronization
0 likes · 19 min read

The article analyzes the challenges of maintaining data consistency when using both cache (local memory or Redis) and a database, classifies data by real‑time requirements, evaluates four double‑write strategies, and proposes practical solutions such as delayed double deletion, message‑queue compensation, and binlog‑driven cache updates.
BackendCachedata synchronization
0 likes · 8 min read

This article examines the pitfalls of writing to multiple data stores simultaneously—such as consistency and atomicity problems—and proposes a generic solution using change data capture and message queues to keep databases, Redis, Elasticsearch, and Hadoop synchronized.
Consistencydata synchronizationdouble-write
0 likes · 7 min read

This article provides a comprehensive overview of InnoDB architecture, covering its memory structures, background threads, and key features like checkpoint mechanisms, double write, and neighbor page flushing, essential for understanding MySQL's default storage engine.
Background ThreadsBuffer PoolCheckpoint Mechanism
0 likes · 12 min read

This article explores common data‑synchronization challenges such as double‑write consistency and atomicity issues across databases, Redis, Elasticsearch and Hadoop, and presents a generic solution using ordered message queues and change‑data‑capture middleware to ensure reliable, consistent updates.
Consistencybackend developmentchange data capture
0 likes · 8 min read

This article explains the complete disk‑write journey of a MySQL INSERT statement, detailing the roles and order of redo log, binlog, double‑write, insert buffer, and data files, and clarifying InnoDB’s buffer‑pool and flushing mechanisms.
INSERTInnoDBMySQL
0 likes · 8 min read

This article explains InnoDB’s double‑write buffer in MySQL, compares its design and recovery handling with Oracle’s redo and control‑file mechanisms, discusses partial‑write issues, checkpoint strategies, performance impacts on SSDs, and provides practical commands and configuration tips for DBAs.
InnoDBMySQLOracle
0 likes · 21 min read
