Posts

MySQL Added a Column. When Can Downstream Read It?

ALTER TABLE ... ADD COLUMN shipping_note returns Query OK on MySQL. A few seconds later, the first order carrying that note arrives. Before the reporting team ships a dashboard built on the new field, three things still need to be proven separately: Does this column really exist in PostgreSQL, and do its type and nullability match expectations? Did the value on the new row actually arrive — did that row survive the change? While the new field is in flight, can the old consumers still read their data as usual? A successful DDL proves nothing by itself. It is only the first step of the whole chain, not the acceptance conclusion for the whole chain. The Sentence That Causes the Most Trouble "Schema evolution" is often described as if the engine forwarded your DDL to the target. A more accurate — and more useful — way to put it is an ordering constraint : Every downstream write must be handled by a structure compatible with the row that produced it. If the target h...

A CDC Lag Alert Is Firing. Where Is the Change Stuck?

A customer paid for an order, but the support dashboard still says “Awaiting payment.” The sync job is RUNNING , and a lag alert says 90 seconds. Do you investigate the pipeline or the dashboard’s read path? Start by looking up the order and its expected new status in the database the job actually writes to. If it says “Paid,” check the dashboard’s replica, transaction snapshot, or cache. If the new value is missing, work back through source commit, change capture, and the target write. Follow one change rather than guessing from the alert. Here’s what to check on call, what counts as evidence at each boundary, and what to write down when you don’t have it. The 90-second alert is illustrative, not a measured result. On-call quick reference What you know Where to look next Signal that can mislead you Source committed; no evidence this event was captured Check the capture endpoint, job phase, capture scope, and log retention The source log can advance because other tables...

"We Can Just Replay It": The Most Expensive Sentence in Data Engineering

Image
A story about the six hours PostgreSQL was down, and the three offsets that could not agree on where we were. 02:14, Saturday. The alert was not dramatic. primary down — connection refused . A routine maintenance window had turned into an incident, and our PostgreSQL primary was not coming back. In the incident channel, Marcus — the architect who had insisted on Kafka a year earlier — typed the sentence that made everyone relax: "Don't panic. Every change is in Kafka. When PG is back, we just replay it." Six hours later, PostgreSQL came back. We never replayed that day. Not because Kafka was broken. Kafka was fine. Every layer was fine. The problem was that the sentence Marcus typed was not a plan. It was a wish with a topic name attached to it. This is the story of the most expensive sentence in data engineering — and the three positions that quietly disagree every time someone says it. 1. What did "we can replay it" actually promise? Let me be fair ...

MySQL CDC on Kubernetes with Apache SeaTunnel: Verifying the Snapshot-to-Binlog Handoff

Image
If you’re replacing a full export with change data capture (CDC), make one acceptance test nonnegotiable: change rows while the initial snapshot is still reading, then compare the source and target by primary key. A row count won’t catch a missing order if a stray order takes its place. This walkthrough uses Apache SeaTunnel 3.1.0 to replicate a MySQL orders table into a MySQL reporting table. The SeaTunnel MySQL CDC connector reads the initial snapshot and continues from the binlog; the JDBC sink applies changes to the reporting table. In one isolated kind run, we loaded 100,000 orders and compared the tables twice: after catching up with changes made during the snapshot, and again after a second set of changes in the streaming phase. Download the reproducible project for the manifests, job configuration, SQL, figures, and evidence. The companion repository also has both reconciliation outputs. 1. Decide what the target should contain The target is a current-state table, not a histo...

MySQL CDC Parallelism Is Set to 8. Why Are All Eight Readers on the Same Table?

You set Apache SeaTunnel’s MySQL CDC parallelism to 8 and configure 12 tables, yet almost all the reads are coming from one large orders table. Is the split assigner broken? Not necessarily. Parallelism tells you how many pieces of work readers can handle at once. It doesn’t tell you how many different tables those pieces come from. One large table can keep all eight readers busy. There are two separate things to understand: how snapshot splits are assigned, and how a split reconciles the table state it read with changes arriving in the binlog. The first determines whether you’re using the available capacity. The second determines whether you’re syncing the right data. Not eight tables, but up to eight splits being read Given a suitable split key, the connector divides a table into key ranges such as orders:[1,1000) and orders:[1000,2000) . Each SnapshotSplit belongs to one table. Different readers can read different splits of the same table at the same time. On the source side, the ...

MySQL CDC → PostgreSQL with Apache SeaTunnel 3.1.0: A Reproducible Walkthrough

Watch the walkthrough video A replication job can report RUNNING while the row you care about is still missing from the target. For an engineer operating a CDC pipeline, the useful questions are concrete: Did the initial data arrive? Did an update change the existing row? Did a delete disappear downstream? Can the job resume and process a new change after a savepoint? This walkthrough answers those questions with a small, inspectable MySQL CDC → PostgreSQL pipeline. It is based on a real run of the official Apache SeaTunnel 3.1.0 distribution, with source statements and target queries captured at each stage. The exercise covers the initial snapshot, inserts, updates, deletes, one add-column schema change, and controlled savepoint stop-and-restore. Apache SeaTunnel is an open-source data integration tool . Here, its MySQL CDC connector reads the source, the SeaTunnel engine executes the pipeline, and the JDBC sink writes to PostgreSQL. There is no intermediate transform, Kafka clu...