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

new: deepcopy new payload #628

Merged
merged 1 commit into from
May 21, 2024

Conversation

joein
Copy link
Member

@joein joein commented May 15, 2024

#624 suggests to return deepcopy of payload from scroll/search/etc api, so any changes to the payload returned by these operations won't affect the state of the payload in the db

However, it does not consider a case when the original payload which has been uploaded to db will be changed

e.g.

payload = {"a": {"b": 1}}
...
client.upsert(..., points=[PointStruct(..., payload=payload)])
...
payload["a"]["b"] = 2  # affects the payload in the db

This PR fixes this behaviour

@joein joein requested review from generall and I8dNLo May 15, 2024 11:58
@joein joein merged commit c9f6543 into copy-payload-local-mode May 21, 2024
10 checks passed
joein added a commit that referenced this pull request May 21, 2024
* new: return copy of payload

* new: deepcopy new payload (#628)
joein added a commit that referenced this pull request Jun 20, 2024
* new: return copy of payload

* new: deepcopy new payload (#628)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants