Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21384

Add lock aquisition/release to Lexorank debug logging

    XMLWordPrintable

Details

    • Hide

      The suggestion has been implemented. Now the logs are visible in the atlassian-jira.log file after enabling package: com.atlassian.greenhopper.manager.lexorank

      Example:

      2023-09-22 13:57:20,761 lexorank-executor-thread-0 DEBUG      [greenhopper.manager.lexorank.LexoRankDaoImpl] Acquiring Lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b
       2023-09-22 13:57:20,762 lexorank-executor-thread-0 DEBUG      [greenhopper.manager.lexorank.LexoRankDaoImpl] Acquired Lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b
       2023-09-22 13:57:20,762 lexorank-executor-thread-0 DEBUG      [greenhopper.manager.lexorank.LexoRankDaoImpl]  LexoRank Query : SELECT FIELD_ID,ID,ISSUE_ID,LOCK_HASH,LOCK_TIME,RANK,TYPE FROM PUBLIC.AO_60DB71_LEXORANK WHERE FIELD_ID = ? ORDER BY RANK DESC LIMIT 2; params[10000]
       2023-09-22 13:57:20,762 lexorank-executor-thread-0 DEBUG      [greenhopper.manager.lexorank.LexoRankDaoImpl] Releasing Lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b
       2023-09-22 13:57:20,763 lexorank-executor-thread-0 DEBUG      [greenhopper.manager.lexorank.LexoRankDaoImpl] Released lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b
       2023-09-22 13:57:20,763 lexorank-executor-thread-0 INFO      [service.lexorank.balance.LexoRankBalancerProgressLogger] Balancing rank field with id[10000] - 1 out of 2 rows (50%) complete.
       2023-09-22 13:57:20,764 lexorank-executor-thread-0 DEBUG      [greenhopper.manager.lexorank.LexoRankDaoImpl]  LexoRank Query : SELECT FIELD_ID,ID,ISSUE_ID,LOCK_HASH,LOCK_TIME,RANK,TYPE FROM PUBLIC.AO_60DB71_LEXORANK WHERE FIELD_ID = ? AND BUCKET = ? ORDER BY RANK DESC LIMIT 1; params[10000, 0]
       2023-09-22 13:57:20,764 lexorank-executor-thread-0 DEBUG      [greenhopper.manager.lexorank.LexoRankDaoImpl]  LexoRank Query : SELECT FIELD_ID,ID,ISSUE_ID,LOCK_HASH,LOCK_TIME,RANK,TYPE FROM PUBLIC.AO_60DB71_LEXORANK WHERE FIELD_ID = ? AND BUCKET = ? ORDER BY RANK ASC LIMIT 1; params[10000, 1]
      

      Available logs:

      log.debug("Acquired Lexorank lock: " + lock.hash + "; Failed to lock all entities. Expected %d but locked only %d", lock.getCount(), numberOfUpdates);
      log.debug("Acquired Lexorank lock: " + lock.hash);
      log.debug("Releasing Lexorank lock: " + lock.hash);
      log.debug("Released lexorank lock: " + lock.hash);
      log.debug(" LexoRank Query : %s", selectStatement.toSql());
      log.debug("Acquiring Lexorank lock: " + lock.hash);
      
      Show
      The suggestion has been implemented. Now the logs are visible in the atlassian-jira.log file after enabling package: com.atlassian.greenhopper.manager.lexorank Example: 2023-09-22 13:57:20,761 lexorank-executor-thread-0 DEBUG [greenhopper.manager.lexorank.LexoRankDaoImpl] Acquiring Lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b 2023-09-22 13:57:20,762 lexorank-executor-thread-0 DEBUG [greenhopper.manager.lexorank.LexoRankDaoImpl] Acquired Lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b 2023-09-22 13:57:20,762 lexorank-executor-thread-0 DEBUG [greenhopper.manager.lexorank.LexoRankDaoImpl] LexoRank Query : SELECT FIELD_ID,ID,ISSUE_ID,LOCK_HASH,LOCK_TIME,RANK,TYPE FROM PUBLIC.AO_60DB71_LEXORANK WHERE FIELD_ID = ? ORDER BY RANK DESC LIMIT 2; params[10000] 2023-09-22 13:57:20,762 lexorank-executor-thread-0 DEBUG [greenhopper.manager.lexorank.LexoRankDaoImpl] Releasing Lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b 2023-09-22 13:57:20,763 lexorank-executor-thread-0 DEBUG [greenhopper.manager.lexorank.LexoRankDaoImpl] Released lexorank lock: 738b71cd-44d0-40fa-91de-227fedb1d10b 2023-09-22 13:57:20,763 lexorank-executor-thread-0 INFO [service.lexorank.balance.LexoRankBalancerProgressLogger] Balancing rank field with id[10000] - 1 out of 2 rows (50%) complete. 2023-09-22 13:57:20,764 lexorank-executor-thread-0 DEBUG [greenhopper.manager.lexorank.LexoRankDaoImpl] LexoRank Query : SELECT FIELD_ID,ID,ISSUE_ID,LOCK_HASH,LOCK_TIME,RANK,TYPE FROM PUBLIC.AO_60DB71_LEXORANK WHERE FIELD_ID = ? AND BUCKET = ? ORDER BY RANK DESC LIMIT 1; params[10000, 0] 2023-09-22 13:57:20,764 lexorank-executor-thread-0 DEBUG [greenhopper.manager.lexorank.LexoRankDaoImpl] LexoRank Query : SELECT FIELD_ID,ID,ISSUE_ID,LOCK_HASH,LOCK_TIME,RANK,TYPE FROM PUBLIC.AO_60DB71_LEXORANK WHERE FIELD_ID = ? AND BUCKET = ? ORDER BY RANK ASC LIMIT 1; params[10000, 1] Available logs: log.debug( "Acquired Lexorank lock: " + lock.hash + "; Failed to lock all entities. Expected %d but locked only %d" , lock.getCount(), numberOfUpdates); log.debug( "Acquired Lexorank lock: " + lock.hash); log.debug( "Releasing Lexorank lock: " + lock.hash); log.debug( "Released lexorank lock: " + lock.hash); log.debug( " LexoRank Query : %s" , selectStatement.toSql()); log.debug( "Acquiring Lexorank lock: " + lock.hash);
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Lexorank sometimes fails to rank issues due to locks: Ranking failed due to LOCK_HASH is not null

      It would be helpful for troubleshooting if we had debug logging that showed the requests that created the locks so we could determine if there is something (like a third-party plugin, for example) causing issues.

      Attachments

        Issue Links

          Activity

            People

              nwroblewska Natalia Wroblewska
              5fb7769fcbc7 Allan Gandelman
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: