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(dao): add ability to select and delete expired entities #13296

Merged
merged 4 commits into from
Jul 3, 2024
Merged

Conversation

raoxiaoyan
Copy link
Contributor

@raoxiaoyan raoxiaoyan commented Jun 25, 2024

Summary

Before running the TTL cleanup in the background timer. it can't delete or select an entity after the TTL expires.
The context of this PR has been written in KAG-4833.

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
  • [na] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

KM-111, KAG-4833

@github-actions github-actions bot added core/db schema-change-noteworthy cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jun 25, 2024
@raoxiaoyan raoxiaoyan marked this pull request as draft June 25, 2024 02:39
@raoxiaoyan raoxiaoyan changed the title fix(dao): query records without ttl condition. fix(dao): can't be deleted or selected after TTL expires. Jun 25, 2024
@raoxiaoyan raoxiaoyan changed the title fix(dao): can't be deleted or selected after TTL expires. fix(dao): can't be deleted or selected an entity after TTL expires. Jun 25, 2024
@raoxiaoyan raoxiaoyan requested review from bungle and chobits June 25, 2024 07:41
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 1, 2024
@raoxiaoyan raoxiaoyan force-pushed the fix/KM-111 branch 3 times, most recently from 40d52c9 to 46fae63 Compare July 1, 2024 03:22
@raoxiaoyan raoxiaoyan requested a review from chobits July 1, 2024 06:21
@raoxiaoyan raoxiaoyan marked this pull request as ready for review July 1, 2024 06:21
kong/db/strategies/postgres/init.lua Outdated Show resolved Hide resolved
kong/db/strategies/postgres/init.lua Outdated Show resolved Hide resolved
kong/db/strategies/postgres/init.lua Outdated Show resolved Hide resolved
@raoxiaoyan raoxiaoyan requested a review from chobits July 2, 2024 07:25
@ADD-SP ADD-SP changed the title fix(dao): can't be deleted or selected an entity after TTL expires. fix(dao): entity cannot be deleted or selected after TTL expires Jul 3, 2024
Copy link
Contributor

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Maybe I missed something, where we used statements like *_skip_ttl?

kong/db/strategies/postgres/init.lua Outdated Show resolved Hide resolved
kong/db/strategies/postgres/init.lua Outdated Show resolved Hide resolved
@raoxiaoyan
Copy link
Contributor Author

@raoxiaoyan raoxiaoyan requested a review from ADD-SP July 3, 2024 07:33
@raoxiaoyan
Copy link
Contributor Author

Maybe I missed something, where we used statements like *_skip_ttl?

@ADD-SP The context of this PR has been written in KAG-4833.

@ADD-SP ADD-SP changed the title fix(dao): entity cannot be deleted or selected after TTL expires feat(dao): add ability to select and delete expired entities Jul 3, 2024
@raoxiaoyan raoxiaoyan requested a review from ADD-SP July 3, 2024 08:23
@ADD-SP ADD-SP merged commit ef81e6f into master Jul 3, 2024
37 of 38 checks passed
@ADD-SP ADD-SP deleted the fix/KM-111 branch July 3, 2024 08:42
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13296-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13296-to-master-to-upstream
git checkout -b cherry-pick-13296-to-master-to-upstream
ancref=$(git merge-base 63c01e5a20f46ec550a22370bd4c0bf0446694e5 5da83edf8d43d727e227100bd80ff9f4e8b8dead)
git cherry-pick -x $ancref..5da83edf8d43d727e227100bd80ff9f4e8b8dead

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Jul 3, 2024
@raoxiaoyan raoxiaoyan removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Jul 4, 2024
oowl pushed a commit that referenced this pull request Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants