-
Notifications
You must be signed in to change notification settings - Fork 517
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
[BUG] Remove empty tag values #2269
Conversation
src/fork_gc.c
Outdated
uint64_t *id) { | ||
if (FGC_recvBuffer(fgc, (void **)fieldName, fieldNameLen) != REDISMODULE_OK) { | ||
static FGCError recvNumericTagHeader(ForkGC *fgc, tagNumHeader *header, int type) { | ||
size_t tagValLen; |
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.
Do you use this?
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.
No, but we cannot pass NULL to FGC_recvBuffer
.
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.
👍
Some small comments
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.
@MeirShpilraien made requested changes
src/fork_gc.c
Outdated
uint64_t *id) { | ||
if (FGC_recvBuffer(fgc, (void **)fieldName, fieldNameLen) != REDISMODULE_OK) { | ||
static FGCError recvNumericTagHeader(ForkGC *fgc, tagNumHeader *header, int type) { | ||
size_t tagValLen; |
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.
No, but we cannot pass NULL to FGC_recvBuffer
.
IndexIterator **its; | ||
uint32_t uid; |
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.
We do not use this?
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.
@MeirShpilraien
Since I use TagIndex
with TagIndex_OpenIndex
to retrieve the inverted index of the tag value.
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.
Last comment
* [BUG] Remove empty tag values * Remove comment * test cursor * Per Meir review * clean up * init ptr (cherry picked from commit 4aa6f9b)
The fix updates ForkGC to remove empty tag values from the trie. This caused a leak.
This bug affected indexes where TAG fields are updated with new values while the old, deleted values are left in the trie.