-
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
fix(dbless): construct right pk string for entity with multiple primary keys #13826
Open
chobits
wants to merge
6
commits into
master
Choose a base branch
from
fix/sync_kag_5732
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+23
−9
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
github-actions
bot
added
core/db
schema-change-noteworthy
cherry-pick kong-ee
schedule this PR for cherry-picking to kong/kong-ee
labels
Nov 4, 2024
team-gateway-bot
added
the
author/community
PRs from the open-source community (not Kong Inc)
label
Nov 4, 2024
chronolaw
changed the title
fix(sync/lmdb): construct right pk string for entity with multiple primary keys
fix(clustering/sync): construct right pk string for entity with multiple primary keys
Nov 4, 2024
chronolaw
changed the title
fix(clustering/sync): construct right pk string for entity with multiple primary keys
fix(dbless): construct right pk string for entity with multiple primary keys
Nov 4, 2024
chronolaw
approved these changes
Nov 4, 2024
team-eng-enablement
removed
the
author/community
PRs from the open-source community (not Kong Inc)
label
Nov 4, 2024
@chobits is working on fixing this PR, do not merge yet. |
…imary keys For the entity with multiple primary keys, like consumer_group_consumers, the pk_string() function construct incorrect pk string like `table: 0x028a49eda0:table: 0x0289c257b8`. Because it does not extract the internal id value. Here, we fix it with original lmdb logic get_cache_key_value(). Note this method directly gets id field name.
…tring (#10623) * fix(sync): don't use an upvalue request_aware_table to construct pk_string * fix: use local upvalue {}
chobits
force-pushed
the
fix/sync_kag_5732
branch
from
November 5, 2024 06:04
1ac52f4
to
4656916
Compare
ready for reviewing, Still need another fix to iterate the foreign pk strings. TODO kag: https://konghq.atlassian.net/browse/KAG-5750 |
chronolaw
approved these changes
Nov 5, 2024
chobits
commented
Nov 5, 2024
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
core/db
schema-change-noteworthy
size/M
skip-changelog
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
For the entity with multiple primary keys, like consumer_group_consumers, the pk_string() function construct incorrect pk string like
table: 0x028a49eda0:table: 0x0289c257b8
. Because it does not extract the internal id value. Here, we fix it with original lmdb logic get_cache_key_value(). Note this method directly gets id field name.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix KAG-5732