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

feat(queue): implement functions Quque.is_full & Queue.can_enqueue #13164

Merged
merged 19 commits into from
Jun 7, 2024

Conversation

ADD-SP
Copy link
Contributor

@ADD-SP ADD-SP commented Jun 5, 2024

SQUASH AND MERGE

Summary

Generating entries is expensive in some cases,
so we'd better have a way to observe the state of the Queue.
So we are able to skip generating if the Queue is already or will be full.

This is the pre-requirement of https://github.com/Kong/kong-ee/pull/9273.

Checklist

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

Issue reference

KAG-4270

@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Jun 5, 2024
@ADD-SP ADD-SP changed the title feat(queue): implement Quque.is_full(queue_conf, entry) to check the state before enqueuing feat(queue): implement Quque.is_full(queue_conf, entry) to check the state before enqueueing Jun 5, 2024
@ADD-SP ADD-SP force-pushed the add_sp/feat-plugin-queue-is-full branch 2 times, most recently from 4e1dafe to 43516ac Compare June 5, 2024 08:43
@ADD-SP ADD-SP changed the title feat(queue): implement Quque.is_full(queue_conf, entry) to check the state before enqueueing @ADD-SP feat(queue): implement functions Quque.is_full & Queue.will_full Jun 5, 2024
@ADD-SP ADD-SP changed the title @ADD-SP feat(queue): implement functions Quque.is_full & Queue.will_full feat(queue): implement functions Quque.is_full & Queue.will_full Jun 5, 2024
@ADD-SP ADD-SP marked this pull request as ready for review June 5, 2024 08:45
@ADD-SP ADD-SP requested a review from hanshuebner June 5, 2024 08:45
@ADD-SP ADD-SP force-pushed the add_sp/feat-plugin-queue-is-full branch 2 times, most recently from 09ef243 to f265514 Compare June 5, 2024 08:49
kong/tools/queue.lua Outdated Show resolved Hide resolved
kong/tools/queue.lua Outdated Show resolved Hide resolved
kong/tools/queue.lua Outdated Show resolved Hide resolved
kong/tools/queue.lua Outdated Show resolved Hide resolved
@ADD-SP ADD-SP force-pushed the add_sp/feat-plugin-queue-is-full branch from f265514 to 04f7f26 Compare June 5, 2024 09:12
@ADD-SP ADD-SP requested a review from hanshuebner June 5, 2024 09:12
@ADD-SP ADD-SP changed the title feat(queue): implement functions Quque.is_full & Queue.will_full feat(queue): implement functions Quque.is_full & Queue.can_enqueue Jun 5, 2024
kong/tools/queue.lua Outdated Show resolved Hide resolved
@ADD-SP ADD-SP requested a review from hanshuebner June 5, 2024 09:51
kong/tools/queue.lua Outdated Show resolved Hide resolved
kong/tools/queue.lua Outdated Show resolved Hide resolved
@ADD-SP ADD-SP requested a review from chronolaw June 6, 2024 02:38
kong/tools/queue.lua Outdated Show resolved Hide resolved
@ADD-SP ADD-SP force-pushed the add_sp/feat-plugin-queue-is-full branch from fd77e80 to ae0d501 Compare June 6, 2024 04:52
@ADD-SP ADD-SP requested a review from hanshuebner June 6, 2024 04:58
kong/tools/queue.lua Outdated Show resolved Hide resolved
kong/tools/queue.lua Outdated Show resolved Hide resolved
@ADD-SP ADD-SP requested a review from chronolaw June 6, 2024 07:00
kong/tools/queue.lua Outdated Show resolved Hide resolved
@ADD-SP ADD-SP requested a review from chronolaw June 7, 2024 06:51
@ADD-SP ADD-SP merged commit d1994f7 into master Jun 7, 2024
25 checks passed
@ADD-SP ADD-SP deleted the add_sp/feat-plugin-queue-is-full branch June 7, 2024 07:52
@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 size/L skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants