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 Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5
    • Component/s: Batch Analysis
    • Labels:
      None
    • Number of attachments :
      0

      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
          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
          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
          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
          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 added a comment -

          Well done Julien, Manually tested !

          Show
          Freddy Mallet added a comment - Well done Julien, Manually tested !
          Hide
          Julien HENRY added a comment -

          IT added

          Show
          Julien HENRY added a comment - IT added

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Freddy Mallet
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: