feat(sdk-core): add SdkWarmUp.prime() for CRaC auto-priming#7056
Open
joviegas wants to merge 1 commit into
Open
feat(sdk-core): add SdkWarmUp.prime() for CRaC auto-priming#7056joviegas wants to merge 1 commit into
joviegas wants to merge 1 commit into
Conversation
alextwoods
reviewed
Jun 19, 2026
| return; | ||
| } | ||
|
|
||
| ClasspathWarmUpInvoker.create().invokeAll(); |
Contributor
There was a problem hiding this comment.
If this fails (raises some error), should we reset the PRIMED?
| } | ||
|
|
||
| invokedAny = true; | ||
| try { |
Contributor
There was a problem hiding this comment.
Is there a reason to have two seperate try catch blocks here?
| return ServiceLoader.load(SdkWarmUpProvider.class, classLoader).iterator(); | ||
| } | ||
|
|
||
| private static final class CountingProvider implements SdkWarmUpProvider { |
Contributor
There was a problem hiding this comment.
I'm a little confused about why we have effectively 3 test implementations that do the same thing (CoutningProvider, RealProvider and CountingWarmUpProvider)? And why does this one use a private invocation counter vs the other ones public constant?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Next building block of CRaC (Coordinated Restore at Checkpoint) auto-priming: the warm-up entry point that drives priming before a checkpoint. Builds on the previously added
SdkWarmUpProviderSPI. Follows the same ServiceLoader discovery pattern the SDK already uses for SdkHttpService (the HTTP-client loader).Modifications
SdkWarmUpinsoftware.amazon.awssdk.core.crac: a@SdkPublicApifinal utility with a single staticprime(). It discovers everySdkWarmUpProvideron the classpath viaServiceLoaderand invokeswarmUp()on each. Modeled on the HTTP-client ServiceLoader loader pattern.AtomicBooleanrun-once guard.software.amazon.awssdk.core.internal.crac(WarmUpInvoker+ClasspathWarmUpInvoker+WarmUpServiceLoader), splitting the discover-and-invoke logic from the static entry point so it stays testable.License
License