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

Add unique index for Device model #1705

Merged
merged 3 commits into from
Apr 2, 2025
Merged

Conversation

AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Mar 27, 2025

Unique index for Device model + handle duplicated mongo error when device is autoprovisioned.

Issue #1576

Related with https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#uniqueness-of-groups-and-devices

and fixes: telefonicaid/iotagent-json#865

@AlvaroVega AlvaroVega marked this pull request as ready for review March 27, 2025 10:21
@AlvaroVega AlvaroVega requested a review from fgalan March 31, 2025 08:45
- Add: index for Device model based on {service: 1, subservice: 1, id: 1, apikey: 1} (#1576)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have index documented in some .md file (either in this repo or IOTA-JSON)? In that case, documentation should be changed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# 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.

Duplicated Devices when burst MQTT measures and non provisoned Device
2 participants