-
Notifications
You must be signed in to change notification settings - Fork 910
Fixed overflow bugs in backoff strategy #1668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… the maximum policy document size for Image Builder resource-based policy APIs.
…sters to different instance types.
…t the guidance for associating a web ACL to a CloudFront distribution.
…umer style invocations" This reverts commit 61a3e74.
…ge tags for event buses.
…d manage tags for event buses.
…ntering your GSTIN when creating AWS Snowball jobs in the Asia Pacific (Mumbai) region.
…for Lustre that are ideal for longer-term storage and workloads, and a new generation of scratch file systems that offer higher burst throughput for spiky workloads.
…d size of SecretString or SecretBinary from 10KB to 64KB in the CreateSecret, UpdateSecret, PutSecretValue and GetSecretValue APIs.
…Broker Log delivery to CloudWatch, S3, and Firehose.
…ogs for Standard Workflows.
…ances CLI and SDK's so that if you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
…ports retained variant properties, e.g., instance count, variant weight. SageMaker ListTrials API filter by TrialComponentName. Make ExperimentConfig name length limits consistent with CreateExperiment, CreateTrial, and CreateTrialComponent APIs.
…s API operation a new response field called IntegrationTypes. The IntegrationTypes field lists the types of actions that a product performs relative to Security Hub such as send findings to Security Hub and receive findings from Security Hub.
…nt Redaction feature enables you to automatically redact sensitive personally identifiable information (PII) from transcription results. It replaces each instance of an identified PII utterance with a [PII] tag in the transcript.
…ags to accelerators and bringing your own IP address to AWS Global Accelerator (BYOIP).
… in Amazon Lightsail, and to create instance, database, and load balancer metric alarms that notify you based on the value of a metric relative to a threshold that you specify.
Kudos, SonarCloud Quality Gate passed!
|
Codecov Report
@@ Coverage Diff @@
## master #1668 +/- ##
=========================================
Coverage ? 74.47%
Complexity ? 902
=========================================
Files ? 959
Lines ? 30365
Branches ? 2393
=========================================
Hits ? 22613
Misses ? 6617
Partials ? 1135
Continue to review full report at Codecov.
|
Fixed issue #1453 based on the proposed fix code provided by OlegZhukov, set up ceils for
baseDelay
,maxBackoffTime
andretriesAttempted
to prevent potential overflow problems.Description
Added three ceils for
baseDelay
,maxBackoffTime
andretriesAttempted
respectively. Restricted theexponentialDelayMillis
from overflow via applying these ceils in calculation. Added unit tests forEqualJitterBackoffStrategy.java
based on proposed test cases provided by OlegZhukov.Motivation and Context
Before this modification, the exponentialDelay has a risk of overflow due to its type as Integer. Besides,
baseDelay
andmaxBackoffTime
are not checked if they will meet overflow problems while converting into Millis. So to fix these potential problems, we need to add some restrictions on these variables, as well as the calculation.The open issue corresponding to this pull request is: #1453
Testing
Only one test class is added, and it only includes unit tests for
EqualJitterBackoffStrategyTest.java
. ForFullJitterBackoffStrategy.java
, there isn't appropriate test cases since the exponentialDelay calculated with Full Jitter Backoff Strategy is a totally random number, which isn't suitable for testing.The unit tests added basically covering all possible cases include: normal situation of retries, retries with extreme large duration as
baseDelay
andmaxBackoffTime
respectively, retries with single nanosecond asbaseDelay
andmaxBackoffTime
respectively, valid retries Attempt times, invalid retries Attempt times and retries with negative duration.Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsLicense