By using AWS re:Post, you agree to the AWS re:Post Terms of Use

DMS - 持续复制由于 Redshift 集群维护导致重复记录

0

【以下的问题经过翻译处理】 你好,

我在使用DMS进行数据同步时遇到了问题。每周目标Redshift集群进行维护工作会导致少量重复记录,其中一个cloudwatch日志中的错误提示是 Failed to start rollback apply transaction,看起来像是DMS无法撤销批处理操作,由于 RecoverableErrorCount 设置为-1,所以进程会从之前已经运行的批次重新尝试进行持续复制,从而导致记录重复。

是否有通过DMS设置处理由于集群维护所引起的回滚失败问题的方法?或者有没有解决集群维护问题的方法?

谢谢!

以下是我的设置:

数据源:Mysql 目标:Redshift

{ "ErrorBehavior": { "FailOnNoTablesCaptured": true, "ApplyErrorUpdatePolicy": "SUSPEND_TABLE", "FailOnTransactionConsistencyBreached": true, "RecoverableErrorThrottlingMax": 1800, "DataErrorEscalationPolicy": "SUSPEND_TABLE", "ApplyErrorEscalationCount": 5, "RecoverableErrorStopRetryAfterThrottlingMax": true, "RecoverableErrorThrottling": true, "ApplyErrorFailOnTruncationDdl": false, "DataTruncationErrorPolicy": "SUSPEND_TABLE", "ApplyErrorInsertPolicy": "SUSPEND_TABLE", "EventErrorPolicy": "IGNORE", "ApplyErrorEscalationPolicy": "SUSPEND_TABLE", "RecoverableErrorCount": -1, "DataErrorEscalationCount": 5, "TableErrorEscalationPolicy": "SUSPEND_TABLE", "RecoverableErrorInterval": 5, "ApplyErrorDeletePolicy": "SUSPEND_TABLE", "TableErrorEscalationCount": 5, "FullLoadIgnoreConflicts": true, "DataErrorPolicy": "SUSPEND_TABLE", "TableErrorPolicy": "SUSPEND_TABLE" }, "TTSettings": { "TTS3Settings": null, "TTRecordSettings": null, "EnableTT": false }, "FullLoadSettings": { "CommitRate": 10000, "StopTaskCachedChangesApplied": false, "StopTaskCachedChangesNotApplied": false, "MaxFullLoadSubTasks": 8, "TransactionConsistencyTimeout": 1200, "CreatePkAfterFullLoad": false, "TargetTablePrepMode": "DROP_AND_CREATE" }, "TargetMetadata": { "ParallelApplyBufferSize": 10000, "ParallelApplyQueuesPerThread": 0, "ParallelApplyThreads": 32, "TargetSchema": "", "InlineLobMaxSize": 0, "ParallelLoadQueuesPerThread": 0, "SupportLobs": true, "LobChunkSize": 0, "TaskRecoveryTableEnabled": true, "ParallelLoadThreads": 32, "LobMaxSize": 63, "BatchApplyEnabled": true, "FullLobMode": false, "LimitedSizeLobMode": true, "LoadMaxFileSize": 0, "ParallelLoadBufferSize": 1000 }, "BeforeImageSettings": null, "ControlTablesSettings": { "historyTimeslotInMinutes": 5, "HistoryTimeslotInMinutes": 5, "StatusTableEnabled": true, "SuspendedTablesTableEnabled": true, "HistoryTableEnabled": true, "ControlSchema": "dms_control", "FullLoadExceptionTableEnabled": true }, "LoopbackPreventionSettings": null, "CharacterSetSettings": null, "FailTaskWhenCleanTaskResourceFailed": false, "ChangeProcessingTuning": { "StatementCacheSize": 50, "CommitTimeout": 1, "BatchApplyPreserveTransaction": true, "BatchApplyTimeoutMin": 1, "BatchSplitSize": 0, "BatchApplyTimeoutMax": 30, "MinTransactionSize": 1000, "MemoryKeepTime": 60, "BatchApplyMemoryLimit": 500, "MemoryLimitTotal": 1024 }, "ChangeProcessingDdlHandlingPolicy": { "HandleSourceTableDropped": true, "HandleSourceTableTruncated": true, "HandleSourceTableAltered": true }, "PostProcessingRules": null }
profile picture
EXPERT
asked a year ago41 views
1 Answer
0

【以下的回答经过翻译处理】 亲爱的客户,

来自AWS的热情问候!希望您一切安好!

经过阅读您的帖子后,我了解到您在进行Redshift集群维护的持续复制过程中遇到了重复记录,并在dms日志中出现了“无法启动回滚应用事务”的错误。因此,您想知道有哪些方法/步骤可以纠正错误,并且在Redshift集群进行维护时处理dms任务的解决方法。

我想告诉您,已经在复制实例版本3.4.5中修复了将记录复制到目标Redshift的重复问题,如链接[1]所述。因此,请确保使用复制实例版本3.4.5及以上版本。

[+] AWS DMS 发布说明 - AWS 数据库迁移服务 3.4.5 发布说明 - https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReleaseNotes.html#CHAP_ReleaseNotes.DMS345

如果您已经使用了3.4.5及以上版本的复制实例,则需要任务信息以及日志来获取有关此错误的更多详细信息。

因此,我恳请您使用以下链接提出支持案例,并附加任务详细信息以供进一步调查。

[+] https://support.console.aws.amazon.com/support/home?#/case/create

关于Redshift集群维护,作为替代方法,您可以考虑为每次维护开始设置一个RedShift事件通知(REDSHIFT-EVENT-2003和REDSHIFT-EVENT-2004),以触发一个Lambda函数,该函数将根据事件自动停止并恢复DMS任务。请详细阅读链接[1]和[2]以获取更多详细信息。

[1] Amazon Redshift事件通知 - Amazon Redshift事件类别和事件消息 - <https://docs.aws.amazon.com/redshift

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions