dynamodb 流中 SequenceNumbers 的生命周期

Lifetime of SequenceNumbers in dynamodb streams

DynamoDB 有一个流的特性。流捕获 updates/insertions/deletions 到 dynamodb 中的项目。

假设我们有一个只有 1 个分片的 dynamodb。可以说 record1 被插入到 dynamodb。它在流中被分配了序列号 x。现在这条记录将在 24 小时后从流中删除。

现在假设很多天后有人更新了这条记录 1 的属性。现在这将被推送到序列号为 y 的流中。我的问题是是否有可能 x = y.

因为 DynamoDB 流只是在幕后使用 Kinesis Data Streams。因此,序列号是分配给该分片中特定键的增量值。即使使用相同的分区键,它通常会是更高的序列号,但永远不会相同。

例如"sequenceNumber": "49616646814424586504565529445194874935276450526558945282"

这里来自Docs:

Each data record has a sequence number that is unique per partition-key within its shard. Kinesis Data Streams assigns the sequence number after you write to the stream and Sequence numbers for the same partition key generally increase over time. The longer the time period between write requests, the larger the sequence numbers become.