Skip to content

Do not fetch the same order twice per synchronized order - #72

Open
Pichatorn-A4K wants to merge 1 commit into
Keyfactor:mainfrom
Pichatorn-A4K:perf/avoid-duplicate-order-fetch
Open

Do not fetch the same order twice per synchronized order#72
Pichatorn-A4K wants to merge 1 commit into
Keyfactor:mainfrom
Pichatorn-A4K:perf/avoid-duplicate-order-fetch

Conversation

@Pichatorn-A4K

Copy link
Copy Markdown

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.0 assembly; 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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant