You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "spangaer (via GitHub)" <gi...@apache.org> on 2023/04/18 18:43:18 UTC

[GitHub] [incubator-pekko-persistence-dynamodb] spangaer commented on a diff in pull request #13: Protect against doing requests for snapshots that are over 400KB.

spangaer commented on code in PR #13:
URL: https://github.com/apache/incubator-pekko-persistence-dynamodb/pull/13#discussion_r1170441514


##########
src/main/scala/akka/persistence/dynamodb/snapshot/package.scala:
##########
@@ -21,4 +21,21 @@ package object snapshot {
   val Payload = "pay"
   val SequenceNr = "seq"
 
+  /**
+   * Returns (a slightly overestimated) size of the fixed fields in a snapshot DynamoDB record.
+   * 
+   * Assumes the maximum of 21 bytes for a number.
+   * 
+   * Sources 
+   * https://zaccharles.medium.com/calculating-a-dynamodb-items-size-and-consumed-capacity-d1728942eb7c
+   * https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/CapacityUnitCalculations.html
+   */
+  val dynamoFixedByteSize = 

Review Comment:
   We'll adapt when we rebase this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org