Home > Back-end >  What happens when a partition in a DynamoDB table with a local secondary index exceeds capacity?
What happens when a partition in a DynamoDB table with a local secondary index exceeds capacity?

Time:09-22

I'm having a bit of trouble reconciling documentation on how DynamoDB behaves when a partition exceeds capacity of 10GB when there is a local secondary index.

In this article about how adaptive capacity makes many DynamoDB best practices / constraints obsolete, it is said that

DynamoDB splits partitions by sort key if the collection size grows bigger than 10 GB.

But, in this article about adaptive capacity

Adaptive capacity will not split item collections across multiple partitions of the table when there is a local secondary index on the table.

I know the information in these two articles aren't mutually exclusive, but it seems weird that the first article wouldn't at least mention the tremendous downside of having a local secondary index if that were the case.

So, what exactly happens when a partition exceeds capacity with a local secondary index? Does it just throttle the DynamoDB table since it can't split the partition?

CodePudding user response:

First of all please feel free to provide feedback directly on any documentation page which you feel is missing information, that will cut a ticket internally to the team responsible.

To answer your question, when a partition with an LSI grows to 10GB in size you will begin to receive ItemCollectionSizeLimitExceededException which will not allow you to add further data to that partition, you will also be blocked from updating items if the size of the item grows from the update. You will be allowed to delete and read items.

More information can be found here:

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html#LSI.ItemCollections.SizeLimit

  • Related