Repository navigation
Fix set payload by key on non appendable segment - #5113
Merged
Merged
Conversation
agourlay
commented
Sep 20, 2024
| chunk, | ||
| |id, write_segment| write_segment.set_payload(op_num, id, payload, key), | ||
| |_, _, old_payload| old_payload.merge(payload), | ||
| |_, _, old_payload| match key { |
agourlay
commented
Sep 20, 2024
| } | ||
|
|
||
| pub fn merge_by_key(&mut self, value: &Payload, key: &JsonPath) -> OperationResult<()> { | ||
| pub fn merge_by_key(&mut self, value: &Payload, key: &JsonPath) { |
Member
Author
There was a problem hiding this comment.
removing the unnecessary Result type to align with the expected closure
agourlay
marked this pull request as ready for review
September 20, 2024 20:20
timvisee
approved these changes
Sep 23, 2024
JojiiOfficial
left a comment
Member
There was a problem hiding this comment.
Sorry for that one. Missed the separate merge_by_key function.
Member
Author
|
Merging the fix to expedite the release. I will work on a unit test to enforce non regression in a different PR 📝 |
timvisee
pushed a commit
that referenced
this pull request
Sep 23, 2024
Merged
Member
Author
|
Important information, the bug is present only when there is an indexed on the target payload key. |
This file contains hidden or 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
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.
fixes: qdrant/qdrant-client#780
The bug affects set payload operation using
keyon non appendable segments.It manifest itself by the apparition of unexpected payload values at the root level, which are supposed to be added under
key.The bug was introduced in 1.11.1 with https://github.com/qdrant/qdrant/pull/4855/files#diff-fe6fcf41822e7bcc71c22cfb9067f6e80e36228f69d2727724e4cc51abc12e07R193
The fix is to merge the payloads using the
key.I have tested the fix on a user snapshot file.