Do not fetch the same order twice per synchronized order - #72
Open
Pichatorn-A4K wants to merge 1 commit into
Open
Do not fetch the same order twice per synchronized order#72Pichatorn-A4K wants to merge 1 commit into
Pichatorn-A4K wants to merge 1 commit into
Conversation
GetAllConnectorCertsForOrder() calls ViewCertificateOrder() and then calls
GetAllCertsForOrder(orderId), which issues the identical
GET /services/v2/order/certificate/{id} again. Every order in a sync
therefore costs two of those calls instead of one.
That matters against DigiCert's documented burst limit of 100 requests per 5
seconds: a sync already spends roughly four GETs per order plus one per
certificate, so the duplicate is about a fifth of the budget spent on a
response the caller is already holding.
The parameter is optional, so no other call site changes.
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.
GetAllConnectorCertsForOrder() calls ViewCertificateOrder() and then calls
GetAllCertsForOrder(orderId), which issues the identical
GET /services/v2/order/certificate/{id} again. Every order in a sync
therefore costs two of those calls instead of one.
That matters against DigiCert's documented burst limit of 100 requests per 5
seconds: a sync already spends roughly four GETs per order plus one per
certificate, so the duplicate is about a fifth of the budget spent on a
response the caller is already holding.
The parameter is optional, so no other call site changes.
Found during a pre-engagement audit of the shipped 2.4.1
net8.0assembly; verified by building and running the change against a fake client offline. Companion PRs from the same audit: #65, #66, #67.🤖 Generated with Claude Code