Skip to content
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

refactor(router/atc): move assert to unlikely path #12466

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

chronolaw
Copy link
Contributor

@chronolaw chronolaw commented Jan 30, 2024

Summary

This PR changes assert to error and moves it into the function get_field_accessor(),
which is a non-hot path,
so we will remove this cost when finding the func in hash table.

KAG-3634

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

@chronolaw chronolaw force-pushed the perf/move_assert_to_unlikely_path branch from c82204f to 0e91054 Compare February 26, 2024 02:24
@chronolaw chronolaw added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Feb 26, 2024
@chronolaw chronolaw changed the title perf(router/atc): move assert to unlikely path refactor(router/atc): move assert to unlikely path Feb 27, 2024
@ADD-SP ADD-SP merged commit fde3874 into master Feb 27, 2024
33 checks passed
@ADD-SP ADD-SP deleted the perf/move_assert_to_unlikely_path branch February 27, 2024 02:14
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/router size/S skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants