Reputation: 728
DynamoDB has a feature of streams. The stream catches updates/insertions/deletions to items in dynamodb.
Lets say we have a dynamodb with only 1 shard. Lets say that record1 was inserted to dynamodb. It was assigned sequence number x in the stream. Now this record would be deleted from the stream after 24 hours.
Now lets say after many days someone updates an attribute of this record1. Now this would be pushed to stream again with sequence number y. My question is if there is a possibility that x = y.
Upvotes: 1
Views: 773
Reputation: 10333
As DynamoDB streams is just using Kinesis Data Streams behind the scenes. So, sequence number is an incremental value assigned for a particular Key with in that shard. Even with same partition key, it will generally be higher sequence number but never the same.
For example "sequenceNumber": "49616646814424586504565529445194874935276450526558945282"
Here from 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.
Upvotes: 0