019faf74 - Reject slow missing-trigger gs/db requests - #4476
Merged
Conversation
TaprootFreak
marked this pull request as ready for review
July 29, 2026 20:40
This was referenced Jul 29, 2026
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.
What
triggervalues synchronously in bothPOST /gs/dbandPOST /gs/db/custom.Process.GS_DBendpoint kill switch.SettingServicelookup and the obsoletegsTriggerEnforcementschema entry.Manual/Autocalls, the audit-before-reject invariant, and the sub-one-second rejection budget.Why
Production traces showed that the reported ~2.4 s rejection was not caused by parsing the request body: sampled bodies were small and validation took well below a millisecond. Almost the complete delay was spent awaiting the uncached
gsTriggerEnforcementdatabase read under burst load.Enforcement is already active, and missing-trigger requests must now always be rejected. Keeping a database lookup on every rejected call makes the error path contend for the same application and connection resources it is intended to protect.
Impact
Requests without
triggerreceive400 Trigger type is requiredwithout any database/cache await before the throw. Requests declaringManualorAutokeep their existing behavior. The formergsTriggerEnforcementsetting no longer controls this requirement; the existingProcess.GS_DBswitch can still disable the endpoints during an incident.No migration is required.
Validation
Validation and independent review are in progress while this PR remains a draft.