您如何指定DynamoDb的冲突解决策略? (我什至需要吗?) [英] How do you specify DynamoDb's conflict resolution policy? (and do I even need to?)

查看:150
本文介绍了您如何指定DynamoDb的冲突解决策略? (我什至需要吗?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试与DynamoDb接触,并已阅读 Vogels 2007博客post ,它指的是句法和语义和解方法。 $ b $ $ b $ $$$ $$$ $$
$ b

我查看了AWS API(我有点期望getItem调用返回客户端要解析的多个版本)并阅读文档和论坛,但找不到任何引用这个。这篇文章是否仅指的是dynamo世界中的某个事物,而不是DynamoDB,所以我不必担心吗?

解决方案

Dynamo与DynamoDB不同。我知道它很难相信,但这是事实。如果在一致性和可用性之间做出选择,则DynamoDB将青睐前者。只是通过在多个可用区(即可用区)中复制数据来提高可用性。



要具体回答您的问题, get-item 应该始终返回记录的一个版本。您不必担心会从多个版本中选择一个版本,也不必担心数据库中存在版本冲突。



编辑:为明确起见, get-item 始终返回记录的一个版本。它是否是最新版本取决于 ConsistentRead 标志,默认情况下为false。


I'm trying to get to grips with DynamoDb, and having read Vogels 2007 blog post, it refers to syntactic and semantic reconciliation approaches. My app will be fine with 'last write wins' but I want to make sure that I don't have any conflicted items that are sitting in the DB, waiting for the 'client' to resolve them.

I've looked at the AWS API (I was sort of expecting the getItem call to return mulitple version to be resolved by the client) and read the docs and forums but can't find any reference to this. Is this article just referring to something in the dynamo world rather than DynamoDB, and so I don't need to worry about it?

解决方案

Dynamo is not the same as DynamoDB. I know its difficult to believe, but that is the truth. If given a choice between consistency and availability, DynamoDB favors the former. It is just that it increases availability by replicating data in multiple AZs (i.e. availability zones).

To answer your question specifically, get-item should always return one version of a record. You needn't worry about picking one version out of many or having conflicting versions in the database.

Edit: To clarify, get-item always returns one version of a record. Whether it is the latest one depends on the ConsistentRead flag, which is false by default.

这篇关于您如何指定DynamoDb的冲突解决策略? (我什至需要吗?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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