Validation and Business Cutover
After historical migration completes and incremental data nearly catches up, verify structures against the object inventory, compare data in identical windows, then schedule application cutover. Task completion, caught-up positions, or equal row counts alone do not prove consistency. Before cutover, confirm the write-stop and catch-up sequence and rollback conditions. Preserve new writes already received by the target.
Where to operate: the taosExplorer Data Browser or taos CLI for both clusters, the taosExplorer task list, and the application's existing change process. This page is a cutover checklist, not a source of automatic cutover commands.
Business, data, and operations owners must jointly confirm which objects were migrated, the cutoff time, acceptable differences, and failure rollback procedures.
1. Prepare a Cutover Inventory First
| Item | Required records before cutover |
|---|---|
| Objects | Source/target databases, supertables, child tables, and renaming mappings; explicitly identify excluded objects. |
| Data window | Start/end times with time zones, using a half-open interval inclusive at the start and exclusive at the end; list boundary and late-data handling. |
| Schema | Precision, columns, tags, string lengths, primary keys, and application dependencies. |
| Incremental data | Actual topics, consumer groups, tasks, positions for every vgroup, WAL retention, and estimated catch-up time. |
| Application | Target connections, account permissions, query dependencies, dashboards, and upstream write entry points. |
| Rollback | Allowed write downtime, rollback triggers, and preservation of new data after rollback. |
Migrating data does not also migrate user permissions and application configuration. First verify a small set of reads and writes on the target using the planned production application identity. Superuser-only testing is insufficient for cutover.
2. Compare Schema and Objects
Run DESCRIBE and table-list queries for actual objects separately in each cluster's taosExplorer Data Browser or taos CLI and save results. After renaming, compare each object through the mapping inventory; do not blindly pair same-named objects in both databases. Empty tables are part of object verification too. Do not check only populated tables.
For missing columns or mismatched types, precision, or tags, first check task selection and existing target structures. Do not add columns automatically or drop and recreate tables without approval.
3. Compare Data in Identical Windows
The following uses the test databases from TDengine Query Migration. With source data fixed or writes controlled, run separately in the source and target clusters' taosExplorer Data Browser or taos CLI:
SELECT COUNT(*) AS row_count, MIN(ts) AS first_ts, MAX(ts) AS last_ts,
MIN(value) AS min_value, MAX(value) AS max_value
FROM taosx_demo_src.meter_1
WHERE ts >= '2026-11-20T00:00:00Z' AND ts < '2026-11-20T00:01:00Z';
SELECT COUNT(*) AS row_count, MIN(ts) AS first_ts, MAX(ts) AS last_ts,
MIN(value) AS min_value, MAX(value) AS max_value
FROM taosx_demo_dst.meter_1
WHERE ts >= '2026-11-20T00:00:00Z' AND ts < '2026-11-20T00:01:00Z';
Both sides should have two rows in this example, but matching aggregates still do not prove all values match. Continue comparing timestamps, values, and tags record by record for identical primary keys. Cover at least the start boundary, a range before the end boundary, nulls, abnormal types, and high-frequency objects. For large volumes, compare by table and time chunk to avoid large queries affecting production.
If the source continues writing or backdating data during synchronization, sequential queries are not the same snapshot. First agree on a stable window, write-stop point, or business-acceptable comparison boundary. Do not attribute every changing statistical difference to migration failure.
4. Recommended Cutover Sequence
- Complete small-scope migration and application read/write verification first. Record differences and uncovered items.
- With authorization, pause or consolidate old write entry points. Record the last successfully written object, timestamp, and application acknowledgment point, accounting for late writes and in-flight requests.
- Wait for continuous tasks to catch up on all source partitions, checking as described in TMQ Continuous Synchronization, then compare the agreed final window. Historical-query-only plans must perform their designed final incremental backfill.
- After meeting agreed data and application verification criteria, switch read/write connections through the application change process. Do not retain two undesigned write entry points simultaneously.
- Using the application identity, write and query a new controlled business sample on the target. Check permissions, delay, time, and downstream reports.
- Enter the observation period, retaining the old cluster, task configuration, and recovery state. After observation passes, obtain approval before stopping replication or cleaning old objects.
5. Troubleshooting
| Finding | Action |
|---|---|
| Fewer target rows | Narrow differences by table and time range. Check scope, filters, errors, positions, and retention. Do not cut over yet. |
| Equal row counts but different values | Check duplicate-primary-key overwrites, precision, renaming conflicts, and old-data replay. Equal counts are not sufficient to proceed. |
| Positions caught up but gaps remain | Check earlier WAL loss and objects outside topic scope. Backfill from actual historical data. |
| Application cutover fails after new target writes arrive | Preserve these writes before deciding rollback and reverse backfill. Do not simply restore the old address and treat cutover as if it never happened. |
6. Stop and Rollback Conditions
Before stopping replication, record final positions and validation results and retain required WAL, configuration, and independent backups. Before cutover, rollback usually means deferring cutover and continuing repairs. After cutover, rollback involves new target data, dual writes, and consistency and requires business confirmation. One rollback command cannot handle every deployment.
7. Limitations
This page promises neither zero downtime, zero data loss, nor automatic conflict resolution. See Disaster Recovery and Dual-Active Replication for dedicated dual-active driver failover conditions. File backup/restoration, application logic verification, and failure drills each require separate checks. Completing this checklist does not automatically mean they pass.