重要
The feature described on this page is not currently supported on Atlas Infinite clusters during public preview. For the features supported in public preview, see Public Preview Availability.
Atlas支持验证从源集群迁移到目标集群的数据。Atlas中的验证进程会运行一系列检查,以确认实时迁移进程中的数据同步成功。这些检查包括Atlas比较支持的文档和集合。
在将应用程序的数据传输到目标集群之前,请务必验证迁移是否成功。 您可以在实时迁移Atlas用户界面中启用验证,或手动验证数据。
在Atlas实时迁移进程结束时运行的验证进程是可选的。 我们强烈建议您在实时迁移的Atlas用户界面中启用此功能,并请求Atlas运行数据同步验证进程,然后再切换到Atlas中的目标集群。
验证列表
您可以在Atlas用户界面中为实时迁移启用验证过程,作为验证进程的一部分, Atlas会对源集群和目标集群执行以下检查:
在集群上运行的验证检查的阶段和进度。
集群上的估计文档数。
集群上验证器进程哈希的文档数量。
集群上验证进程进程扫描的集合数量。
集群上要包含在验证检查中的集合数量。
如果验证进程发现错误,则实时迁移将失败。
Considerations
对于最多 5 TB 和 3 分片的迁移,嵌入式验证器默认为启用状态。对于超过这些限制的迁移,嵌入式验证器默认为禁用状态。
The verification process requires a large oplog size on the destination cluster. Increase the minimum oplog window on the destination cluster, or set the oplog size to a high enough fixed value. Alternatively, verify data manually.
在Atlas用户界面中启用验证
您可以在Atlas用户界面中启用验证,作为实时迁移进程配置的一部分。有关确切步骤,请参阅将集群实时迁移(拉取)到Atlas。
重要
If you enable verification in the Atlas UI, and Atlas finds any inconsistencies during verification checks, the live migration fails. The verification process DOES NOT check for all possible data inconsistencies. Review limitations in this documentation to see what data the verification process does not support and manually verify this data.
手动验证数据
如果您在实时迁移Atlas用户界面中禁用自动验证,您可以创建脚本来手动验证迁移的数据,并使用替代的手动验证方法来验证数据是否已成功迁移。要学习;了解有关替代方法的更多信息,请参阅 Mongosync:验证数据传输。
限制
实时迁移中的验证进程具有以下限制:
验证在实时迁移(拉取)时运行,但在实时迁移(推送)时不受支持。
您无法恢复验证进程。 如果停止或暂停实时迁移进程,然后重新启动,则验证进程会从头开始。
验证进程不检查:
固定大小集合
带有TTL索引的集合
不使用默认的集合
视图
集合元数据
索引
To ensure a successful live migration and verify data for unsupported collections, indexes, and metadata, you can use one of the alternative verification methods described in Mongosync: Verify Data Transfer.