DynamoDB 冲突解决策略 [英] DynamoDB conflict resolution strategy

查看:29
本文介绍了DynamoDB 冲突解决策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DynamoDB 的冲突解决策略是什么?Dynamo 白皮书中谈到了 GetItem 返回多个版本以供客户端解析.

What is the conflict resolution strategy for DynamoDB ? The white paper on Dynamo talks about returning multiple versions by GetItem to be resolved by the client.

这个 SO 问题 说Dynamo 和DynamoDB 是不同的,GetItem 只返回一个值.在这种情况下,DynamoDB 采用的冲突解决策略是什么?

This SO Question says that Dynamo and DynamoDB are different and GetItem returns only one value. In that case, what is the conflict resolution strategy that DynamoDB employs ?

推荐答案

如上所述,您的问题不是很清楚:DynamoDB 的冲突解决策略是什么" - 什么冲突?您指的是潜在的不一致读取吗?

As stated, your question is not very clear: "What is the conflict resolution strategy for DynamoDB" - what conflicts? Are you referring to potentially inconsistent reads?

DynamoDB,用于 GetItem 查询,允许最终一致和强一致读取,可使用请求中的参数进行配置(如此处的文档中所述:http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html).对于强一致性读取,返回的值是执行查询时的最新值.对于最终的一致性读取,可以读取项目的稍微过时的版本,但本身没有冲突解决方案".

DynamoDB, for GetItem queries, allows both eventual consistent and strongly consistent reads, configurable with a parameter on the request (as described in the docs here: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html). For strongly consistent reads the value returned is the most recent value at the time the query was executed. For eventual consistent reads it is possible to read a slightly out of date version of an item but there is no "conflict resolution" per se.

您可能正在考虑条件更新,如果在执行查询时未满足预期条件,则允许请求失败.

You may be thinking about conditional updates which allow for requests to fail if an expected condition is not met at the time the query is executed.

这篇关于DynamoDB 冲突解决策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆