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

fix(plugins/http-log): improve concurrency when max_batch_size is set to 1 #13384

Closed
wants to merge 1 commit into from

Conversation

vm-001
Copy link
Contributor

@vm-001 vm-001 commented Jul 17, 2024

Summary

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]

@vm-001 vm-001 changed the title fix(plugins/http-log): improve concurrency when max_batch_size is set… fix(plugins/http-log): improve concurrency when max_batch_size is set to 1 Jul 17, 2024
@github-actions github-actions bot added plugins/http-log cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jul 17, 2024
@@ -189,12 +190,27 @@ function HttpLogHandler:log(conf)

local queue_conf = Queue.get_plugin_params("http-log", conf, make_queue_name(conf))
kong.log.debug("Queue name automatically configured based on configuration parameters to: ", queue_conf.name)
local entry = cjson.encode(kong.log.serialize())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pay attention to @chronolaw PR: #13421

We now use the clustering_utils.json_decode or clustering_utils.json_encode.

@@ -189,12 +190,27 @@ function HttpLogHandler:log(conf)

local queue_conf = Queue.get_plugin_params("http-log", conf, make_queue_name(conf))
kong.log.debug("Queue name automatically configured based on configuration parameters to: ", queue_conf.name)
local entry = cjson.encode(kong.log.serialize())

if queue_conf.max_batch_size == 1 then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hidden feature. We can update the official doc https://docs.konghq.com/gateway/latest/kong-plugins/queue.

@vm-001 vm-001 closed this Jul 26, 2024
@outsinre
Copy link
Contributor

Deprecated by #13332.

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 plugins/http-log size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants