Skip to content

feat(serialization): add CRaC/SnapStart priming - #2614

Open
Pratapchandradeo wants to merge 1 commit into
aws-powertools:mainfrom
Pratapchandradeo:feat/2003-serialization-priming
Open

feat(serialization): add CRaC/SnapStart priming#2614
Pratapchandradeo wants to merge 1 commit into
aws-powertools:mainfrom
Pratapchandradeo:feat/2003-serialization-priming

Conversation

@Pratapchandradeo

@Pratapchandradeo Pratapchandradeo commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes

Adds CRaC/SnapStart priming for powertools-serialization.

  • Automatic priming: generate and ship classesloaded.txt, register EventDeserializer as a CRaC resource, and preload classes in beforeCheckpoint() via ClassPreLoader.
  • Invoke priming: run extractDataFrom(...).as() / .asListOf() for every built-in event type so Jackson (and JMESPath) is warmed before the SnapStart snapshot.
  • Users can call EventDeserializer.init() during handler initialization so the CRaC hook is registered before snapshot.
  • Documents the SnapStart usage in docs/utilities/serialization.md.

Issue number: #2003
Parent issue: #1588
Sample PR: #1861

Tests

Ran mvn -pl powertools-serialization -am verify -P build-with-spotbugs:

  • 56 powertools-serialization tests
  • 44 powertools-common tests
  • SpotBugs with 0 bugs
  • Maven build successful

fixes #2003

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • I confirm that I can use, modify, copy, and redistribute this contribution under the terms of your choice

Acknowledgment

Add automatic class preloading and invoke priming for
powertools-serialization so SnapStart snapshots a warm Jackson
deserialization path.

Closes aws-powertools#2003
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Priming for powertools-serialization

1 participant