Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-4053

The semaphore mechanism should automatically detect when an other semaphore is outdated and so can/should be ignored

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5
    • Component/s: Batch Analysis
    • Labels:
      None

      Description

      This semaphore mechanism was introduced in Sonar 3.4 to prevent two analysis on the same resource (project, view, ...) to be executed at the same time. But if an analysis is unexpectedly stopped for instance by killing the java process, the semaphore remains and it's then up to the Sonar administrator to use the property 'sonar.forceAnalysis' to ignore this past outdated semaphore.

      We should prevent the Sonar administrator from having to take care about such situation by asking each alive semaphore to 'ping' the Sonar server. If a semaphore hasn't ping the Sonar server during the past X minutes we could then consider it as outdated.

        Issue Links

          Activity

          Hide
          sni Stéphane Nicoll added a comment - - edited

          oh yes, please fix that.

          WARNING the property in the description is wrong. In CI/Ant/Maven whatever you have to use -Dsonar.forceAnalysis=true to force the analysis.

          Show
          sni Stéphane Nicoll added a comment - - edited oh yes, please fix that. WARNING the property in the description is wrong. In CI/Ant/Maven whatever you have to use -Dsonar.forceAnalysis=true to force the analysis.
          Hide
          henryju OLD - Julien HENRY added a comment -

          When a semaphore is acquired there is now a background thread that will update semaphore every 10 seconds.
          When another process try to acquire an already locked semaphore that was not updated for 15 seconds then the previous process is supposed to have been killed and the semaphore is acquired by the new process.

          The property "sonar.forceMode" was removed.

          Show
          henryju OLD - Julien HENRY added a comment - When a semaphore is acquired there is now a background thread that will update semaphore every 10 seconds. When another process try to acquire an already locked semaphore that was not updated for 15 seconds then the previous process is supposed to have been killed and the semaphore is acquired by the new process. The property "sonar.forceMode" was removed.
          Hide
          freddy.mallet Freddy Mallet added a comment -

          Well done Julien, Manually tested !

          Show
          freddy.mallet Freddy Mallet added a comment - Well done Julien, Manually tested !
          Hide
          henryju OLD - Julien HENRY added a comment -

          IT added

          Show
          henryju OLD - Julien HENRY added a comment - IT added

            People

            • Assignee:
              henryju OLD - Julien HENRY
              Reporter:
              freddy.mallet Freddy Mallet
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: