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

Multibranch Scan is corrupting SVN Branch Cache triggered by changes to cloudbees-folder PeriodicFolderTrigger

XMLWordPrintable

      Changes to cloudbees-folder-plus in Oct-2022 have triggered the scenario that appears to be causing this corruption.

      Since upgrading from 2.340 to 2.462 we have been experiencing corruption of the SVN Branch Cache files ($JENKINS_HOME/caches/svn-*) which breaks the multibranch scan in the manner reported in JENKINS-59093.  The recovery workaround is to remove the cache files.

      We have multiple multibranch pipeline jobs on a large svn repository and some scans were taking 30 seconds due to JENKINS-73577.  Our theory is that these scans were sometimes occurring concurrently, resulting in a corrupted cache.

      We have since discovered a change was made to PeriodicFolderTrigger.run in Oct-2022 which removed ENTROPY, thus increasing the likelyhood that these scans are run concurrently.  We have a poll interval of 10 minutes, internally resulting in the run() method being triggered every 5 minutes using hash scheduling (H/5 * * * *).  The hash is based on the job name and results in us having only 5 unique slots.  But we have 7 trigger jobs (various includes, different builds environments) hence we can't avoid this concurrency.  By selective job renaming (followed by edit/save) we can minimise the concurrency.

      Entropy was removed by this commit (jglick)

      • cloudbees-folder-plugin
        6617f71 Oct 14 2022      Jesse Glick      Rewrite of `PeriodicFolderTrigger.run`
        /src/main/java/com/cloudbees/hudson/plugins/folder/computed/PeriodicFolderTrigger.java

      I accept there may be no appetite for reverting the change as it was done for good reasons, and the removal of entropy simplifies the code.  I also accept that the resulting increase in concurrency has simply increased the likelihood of triggering an existing problem (cache corruption) and is not the direct cause.

      If nothing else, I'm hoping that documenting here will help someone else find workarounds.  But if entropy was added back in, that would be good.

            Unassigned Unassigned
            pwiseman Peter Wiseman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: