-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
chore(db): only enable postgres cleanup timer on nodes that have admin listeners #10405
Merged
Conversation
This file contains 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
bungle
force-pushed
the
chore/pg-cleanup-timer
branch
from
March 1, 2023 11:45
d786543
to
14dbb15
Compare
bungle
force-pushed
the
chore/pg-cleanup-timer
branch
from
March 1, 2023 11:45
14dbb15
to
77d1e79
Compare
hanshuebner
approved these changes
Mar 1, 2023
hbagdi
reviewed
Mar 1, 2023
@@ -315,8 +315,7 @@ end | |||
|
|||
|
|||
function _mt:init_worker(strategies) | |||
if ngx.worker.id() == 0 then | |||
|
|||
if ngx.worker.id() == 0 and #kong.configuration.admin_listeners > 0 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emmm, should this not instead check if the node doesn't have proxy listeners?
Thinking traditional mode.
hanshuebner
pushed a commit
that referenced
this pull request
Mar 3, 2023
* feat(db): batch cleanup expired rows from postgres ### Summary The PR #10405 changed cleanup to only happen on nodes that have Admin API listeners. This PR makes deletion to happen in maximum of 50.000 row batches. Inspired from #10331 and #10389. * change to batch delete on every table * update changelog * add test for ttl cleanup --------- Co-authored-by: windmgc <windmgc@gmail.com>
bungle
changed the title
chore(db): only enable posgres cleanup timer on nodes that have admin listeners
chore(db): only enable postgres cleanup timer on nodes that have admin listeners
Mar 8, 2023
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.
Summary
PR #10389 and #10331 pursued different ways to improve our situation with cleanup timers.
This PR makes it so that it only happens on nodes that have admin listeners. Fairly simple but may already cover the majority of problem space.