Skip to content

MongoBulkWriteError: E11000 duplicate key error collection #39

@kevinsandow

Description

@kevinsandow

MongoBulkWriteError: E11000 duplicate key error collection: ..._alclient.entities index: serverRegion_1_serverIdentifier_1_name_1_type_1 dup key: { serverRegion: "US", serverIdentifier: "III", name: null, type: "mrpumpkin" }

This happens to mrpumpkin & mrgreen, in both cases the key part name is null.

So it's obviously this index that raises the issue:

EntitySchema.index({ name: 1, serverIdentifier: 1, serverRegion: 1, type: 1 }, { unique: true })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions