Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Avoid corrupting $set-ed arrays when transaction error occurs #14346

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

vkarpov15
Copy link
Collaborator

@vkarpov15 vkarpov15 commented Feb 12, 2024

Summary

When we $set an array, it looks like Mongoose converts the array to an object. This PR makes sure we handle array atomics correctly when we reset the document after a transient transaction error.

Fix #14340

Examples

@vkarpov15 vkarpov15 added this to the 8.1.3 milestone Feb 12, 2024
Co-authored-by: hasezoey <hasezoey@gmail.com>
@vkarpov15 vkarpov15 merged commit 50da8e4 into master Feb 14, 2024
30 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-14340 branch February 15, 2024 21:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transaction retries corrupt subdocument arrays
2 participants