gpt4 book ai didi

amazon-web-services - DynamoDB 流可以看到未提交的事务吗?

转载 作者:行者123 更新时间:2023-12-04 12:11:16 26 4
gpt4 key购买 nike

我有一个 DynamoDB 表,我在其中使用事务写入 ( https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transactions.html )。交易由 2 个看跌期权组成。假设第一个 put 成功,第二个失败。在这种情况下,第一个 put 将被事务库回滚。

我还在表上启用了 DynamoDB 流( https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html ),另一个应用程序从该流中使用。

问题:在回滚场景中,第一次成功放置会导致 DynamoDB 流事件,而回滚会导致另一个吗?如果是,是否有办法防止这种情况,即确保仅针对完全完成的事务触发流事件?

最佳答案

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html

Changes made with transactions are propagated to global secondary indexes (GSIs), DynamoDB streams, and backups eventually, after the transaction completes successfully. Because of eventual consistency, tables restored from an on-demand or point-in-time-recovery (PITR) backup might contain some but not all of the changes made by a recent transaction.



因此,当我阅读它时,在事务成功完成之前,您不会在流中看到任何内容。

关于amazon-web-services - DynamoDB 流可以看到未提交的事务吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53770587/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com