Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-73005

Fast enough label creation causes duplicate labels with the same names

    XMLWordPrintable

Details

    Description

      Issue Summary

      New labels can be created via API using the add labels to content API endpoint. If users use this API endpoint multiple times and fast enough, and no label exists at the start of the execution of their script, then multiple labels will be created with the same name.

      Steps to Reproduce

      1. Have a script that calls the above end point very quickly or in parallel for multiple pieces of content and using the same label name.
      2. Run the script

      Expected Results

      One label is created and is associated with all content

      Actual Results

      Multiple labels are created with the same name. It seems to be random which content gets which duplicate, but typically one label will have the most associations.

      This can be confirmed by using the Label List macro and noting that multiple labels are listed with the same name.

      Workaround

      If duplicate labels have been created:

      1. Remove these labels from all content either manually or by utilizing the remove label from content API endpoint.
      2. Add the labels back either manually or by utilizing the add labels to content API endpoint. Since the label exists by the time these requests are received, only one label will be used this time, regardless of the speed of the API calls.

      The above process will ensure that all labels have one and only one label, rather than any duplicate label.

      To prevent this issue from happening in the future, for each new label to be created, make sure that the label exists first (either via UI or one API call), then subsequent calls will use the already created label regardless of the speed at which those calls are created.

      Attachments

        Issue Links

          Activity

            People

              94aeca6c49aa Nick Bourlier
              tbrothers Tyler B [Atlassian]
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: