DynamoDB是否已“设置”?重视CDRT? [英] Are DynamoDB "set" values CDRTs?

查看:202
本文介绍了DynamoDB是否已“设置”?重视CDRT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果 N >> 1 个客户端同时使用,则表示不同的 .amazon.com / amazondynamodb / latest / APIReference / API_UpdateItem.html rel = nofollow title = updateItem API命令文档> updateItem ADD (以某种方式仍处于规定的限制之内)在下一次一致读取时,集合的大小是否始终为10,000?

Stated differently if N >> 1 clients concurrently add 10,000 unique values to a DynamoDB "set" type using updateItem and ADD—somehow remaining under the provisioned limits—will the size of the set always be 10,000 on the next consistent read?

通过设置,我专门指的是可以在DynamoDB中附加的多值数据类型。从理论上讲,单调增长的集合是 CDRT ,但是DynamoDB实现是否为CDRT并未在文档中任何地方提及。实际上,它对安全性并不是完全不是很具体:

By "set" I refer specifically to the Multi-Valued Data Type that can be attached in DynamoDB. In theory, monotonically-growing sets are a CDRT, but whether the DynamoDB implementation is a CDRT is not mentioned anywhere in the documentation. It's not actually not very specific about safety at all:


ADD -添加该属性指定的值(如果属性尚不存在)。如果该属性确实存在,则ADD的行为取决于该属性的数据类型:

ADD - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of ADD depends on the data type of the attribute:

...

如果现有数据类型是集合,并且如果Value也是集合,则将Value附加到现有集合。例如,如果属性值是集合[1,2],并且指定了ADD操作 3 ,则最终属性值为[1,2,3]。如果为集合属性指定了ADD操作,并且指定的属性类型与现有集合类型不匹配,则会发生错误。

If the existing data type is a set, and if Value is also a set, then Value is appended to the existing set. For example, if the attribute value is the set [1,2], and the ADD action specified 3, then the final attribute value is [1,2,3]. An error occurs if an ADD action is specified for a set attribute and the attribute type specified does not match the existing set type.

I已经对此进行了试验,除非我受到限制,否则还不会产生任何丢失的附加项,但是我无法在文档中找到如此无损的保证。实际上,除了条件更新之外,我找不到任何关于任何数据类型的保证。

I have experimented with this and have yet to produce any lost additions unless I get throttled, but I cannot find such a lossless guarantee in the documentation. In fact, I cannot find any such guarantees about any data type except for "conditional updates".

推荐答案

是的,添加/删除

http:/ /aws.amazon.com/dynamodb/faqs/ 仅提及StringSet,但它也适用于其他集合类型。

http://aws.amazon.com/dynamodb/faqs/ only mentions StringSet but it applies to other set types as well.


问:DynamoDB是否支持就地原子更新?

Q: Does DynamoDB support in-place atomic updates?

Amazon DynamoDB支持快速就地更新。您可以使用单个API调用连续增加或减少数字属性。同样,您也可以原子地添加或删除一组字符串。

Amazon DynamoDB supports fast in-place updates. You can increment or decrement a numeric attribute in a row using a single API call. Similarly, you can add or remove to a set of strings atomically as well.

这篇关于DynamoDB是否已“设置”?重视CDRT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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