Commit 1df82c3
feat(idempotency): add automatic priming for DynamoDB persistence store
Implements automatic class preloading via CRaC hooks for the
idempotency-dynamodb module to improve SnapStart cold start performance.
Changes:
- Add ClassPreLoader.preloadClasses() call to DynamoDBPersistenceStore.beforeCheckpoint()
- Generate and include classesloaded.txt with 8,726 classes
- Add powertools-common dependency for ClassPreLoader
- Add Maven profile generate-classesloaded-file
- Add unit tests for CRaC hooks
- Update Priming.md with idempotency-dynamodb example
- Add null check and logging for defensive error handling
This combines both invoke priming (warming DynamoDB SDK paths)
and automatic priming (preloading classes) for optimal performance.
Follows the same pattern as implemented in powertools-metrics (#1861),
powertools-tracing (#2345), and powertools-kafka (#2145).
Fixes #1997
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 61fd80a commit 1df82c3
File tree
5 files changed
+8787
-3
lines changed- powertools-idempotency/powertools-idempotency-dynamodb
- src
- main
- java/software/amazon/lambda/powertools/idempotency/persistence/dynamodb
- resources
- test/java/software/amazon/lambda/powertools/idempotency/persistence/dynamodb
5 files changed
+8787
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
109 | 131 | | |
110 | 132 | | |
111 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
126 | 132 | | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
| |||
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
140 | | - | |
141 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
142 | 153 | | |
143 | 154 | | |
144 | 155 | | |
| |||
0 commit comments