Skip to content

Don't reuse IDs in mixed insert_multiple batches - #633

Open
gyanu2507 wants to merge 1 commit into
msiemens:masterfrom
gyanu2507:insert-multiple-mixed-ids
Open

Don't reuse IDs in mixed insert_multiple batches#633
gyanu2507 wants to merge 1 commit into
msiemens:masterfrom
gyanu2507:insert-multiple-mixed-ids

Conversation

@gyanu2507

Copy link
Copy Markdown

insert() resets _next_id after a Document with an explicit ID. insert_multiple() didn't, and auto-ids in the same batch were still allocated from storage, so [Document(..., 1), {...}] overwrote id 1.

Fixes #629

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.

insert_multiple can silently overwrite documents when mixing Document and dict

1 participant