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

Configuration flag to bypass duplicate message filtering on mapper startup #2605

Closed
albinsuresh opened this issue Jan 19, 2024 · 2 comments
Closed
Assignees
Labels
improvement User value
Milestone

Comments

@albinsuresh
Copy link
Contributor

albinsuresh commented Jan 19, 2024

Is your feature improvement request related to a problem? Please describe.

The mapper currently avoids sending duplicate entity registration messages to the cloud on startup, by ignoring the resent registration messages for the entities that are already present in the restored persistent entity store. But, if someone intentionally/accidentally wipes the entities from the cloud, they will never be recreated again by the mapper, due to this filtering mechanism. So, a mechanism to disable this filtering on startup is desired to ease the syncing of the entire entity state on tedge to the cloud.

Describe the solution you'd like

Introduce a c8y.entity_store.sync_on_startup boolean config flag to enable the above mentioned forced syncing on startup. The default value should be false, to keep the current filtering mechanism as the default.

@didier-wenzek
Copy link
Contributor

didier-wenzek commented Feb 2, 2024

A new tedge config settings has been added: c8y.entity_store.clean_start.
This control the messages sent to Cumulocity IoT on mapper restart.

  • The default setting is for c8y.entity_store.clean_start to be false. Only new services and child-devices, created while the c8y mapper was down, are published to the Cumulocity IoT on mapper restart.
  • When c8y.entity_store.clean_start is set to false, the whole state of the device, services and child-devices is resent to the cloud.

@gligorisaev
Copy link
Contributor

QA has thoroughly checked the feature and here are the results:

  • Test for ticket exists in the test suite.
  • QA has tested the function and it's functioning according description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement User value
Projects
None yet
Development

No branches or pull requests

5 participants