Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47406

@Initializer(after= InitMilestone.JOB_LOADED) race condition with "Cleaning up obsolete items deleted from the disk"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      When using an @Initializer(after=InitMilestone.JOB_LOADED creating items, we end up with a race condition with the Cleaning up obsolete items deleted from the disk task if the latter is run after.

      It means in some cases, the items get created, and in others they are not in memory but are on filesystem.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vincent Latombe
          Path:
          core/src/main/java/jenkins/model/Jenkins.java
          test/src/test/java/jenkins/model/JenkinsTest.java
          test/src/test/resources/plugins/jenkins-47406.hpi
          http://jenkins-ci.org/commit/jenkins/0311b2dffa76ba01748b1be6a18fc7c1955e65fe
          Log:
          [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items (#3078)

          • [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items

          This allows @Initializer(after=InitMilestone.JOB_LOADED) implementations
          to create items safely without risking them to be removed.

          • Revert "[FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items"

          This reverts commit 79ce796b00fde11fda586c9c9e2b8e93a53e2b31.

          • Reverted this commit by mistake

          Revert "Revert "[FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items""

          This reverts commit 36c499c58c83427c7b8a6d3cc5902ec26732b2c7.

          • Add link to hpi sources
          • Fix Mix-up after the previous merge
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: core/src/main/java/jenkins/model/Jenkins.java test/src/test/java/jenkins/model/JenkinsTest.java test/src/test/resources/plugins/jenkins-47406.hpi http://jenkins-ci.org/commit/jenkins/0311b2dffa76ba01748b1be6a18fc7c1955e65fe Log: [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items (#3078) [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items This allows @Initializer(after=InitMilestone.JOB_LOADED) implementations to create items safely without risking them to be removed. JENKINS-47406 Add test with an initializer creating a job Revert " [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items" This reverts commit 79ce796b00fde11fda586c9c9e2b8e93a53e2b31. JENKINS-47406 Reinstate the test with Jesse's solution Reverted this commit by mistake Revert "Revert " [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items"" This reverts commit 36c499c58c83427c7b8a6d3cc5902ec26732b2c7. Add link to hpi sources Fix Mix-up after the previous merge
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          It has been fixed and released in 2.103

          Show
          oleg_nenashev Oleg Nenashev added a comment - It has been fixed and released in 2.103

            People

            • Assignee:
              vlatombe Vincent Latombe
              Reporter:
              vlatombe Vincent Latombe
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: