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(mlcache): release lock upon exiting the renew function #12743

Merged
merged 7 commits into from
Mar 21, 2024

Conversation

chobits
Copy link
Contributor

@chobits chobits commented Mar 18, 2024

Summary

Previously, the mlcache:renew function would return an error message without releasing the lock, potentially leading to lock leaks. With this change, the function now releases the lock before returning the error message, ensuring proper cleanup and preventing lock leaks.

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] no open issue, it's discovered by reviewing the source code.

@chobits chobits marked this pull request as draft March 18, 2024 06:00
@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Mar 18, 2024
@chobits chobits marked this pull request as ready for review March 18, 2024 06:25
@chobits chobits marked this pull request as draft March 20, 2024 09:58
@chobits chobits marked this pull request as ready for review March 21, 2024 09:41
@chobits chobits requested a review from chronolaw March 21, 2024 09:41
kong/resty/mlcache/init.lua Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 21, 2024
@bungle bungle merged commit b5f1da0 into master Mar 21, 2024
26 checks passed
@bungle bungle deleted the fix_mlcache_renew_unlock branch March 21, 2024 11:22
@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/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants