如果我们使用 Table.putItem 更新条目,则条目的不可用时间
Unavailable time of an Entry if we use Table.putItem to Update an Entry
这里我想使用DynamoDB SDK Table.putItem更新一个条目。但我希望即使在更新时也能使用它。
我的问题是有任何已知的停机时间,当条目被替换时条目无法阅读。
DynamoDB 中有两种可用的一致性模型。 Eventually Consistent Reads 是默认的一致性,它会在一秒钟内提供最新的副本。
我认为您正在寻找 强一致性读取。但是,根据我的经验,我不认为 DynamoDB 提供 100% 的保证,它总是 return 最新值,尤其是当您在更新数据库中的项目后读取相同的项目时。
Eventually Consistent Reads (Default) – the eventual consistency
option maximizes your read throughput. However, an eventually
consistent read might not reflect the results of a recently completed
write. Consistency across all copies of data is usually reached within
a second. Repeating a read after a short time should return the
updated data.
Strongly Consistent Reads — in addition to eventual consistency,
Amazon DynamoDB also gives you the flexibility and control to request
a strongly consistent read if your application, or an element of your
application, requires it. A strongly consistent read returns a result
that reflects all writes that received a successful response prior to
the read.
这里我想使用DynamoDB SDK Table.putItem更新一个条目。但我希望即使在更新时也能使用它。 我的问题是有任何已知的停机时间,当条目被替换时条目无法阅读。
DynamoDB 中有两种可用的一致性模型。 Eventually Consistent Reads 是默认的一致性,它会在一秒钟内提供最新的副本。
我认为您正在寻找 强一致性读取。但是,根据我的经验,我不认为 DynamoDB 提供 100% 的保证,它总是 return 最新值,尤其是当您在更新数据库中的项目后读取相同的项目时。
Eventually Consistent Reads (Default) – the eventual consistency option maximizes your read throughput. However, an eventually consistent read might not reflect the results of a recently completed write. Consistency across all copies of data is usually reached within a second. Repeating a read after a short time should return the updated data.
Strongly Consistent Reads — in addition to eventual consistency, Amazon DynamoDB also gives you the flexibility and control to request a strongly consistent read if your application, or an element of your application, requires it. A strongly consistent read returns a result that reflects all writes that received a successful response prior to the read.