Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-5718

[deviceconnect] Patch broken migration (2.0.0)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Higher
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.1
    • Labels:
    • Sprint:
      MEN Sprint 167
    • Story Points:
      5
    • Backlog:
      yes
    • Days in progress:
      4

      Description

      The document migration for deviceconnect is broken and has never worked if a tenant has more than 255 devices. There is a missing BulkWrite inside the inner migration loop. Fix the migration and create a new patch migration that handles potential broken database collections.

      Update: The current migration only results in a functional loss for the open-source version (because of duplicate key on device id in the devices collection) - this issue is partially resolved by multi-tenancy mode doing just-in-time provisioning of devices. However, the migration results in loss of data if the respective size of the collection is larger than 255 documents.

        Attachments

          Activity

            People

            Assignee:
            alfrunes Alf-Rune Siqveland
            Reporter:
            alfrunes Alf-Rune Siqveland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: