How to suspend Lexorank rebalance in JIRA Software Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

As of JIRA Software 7.2.8 or 7.3.3, JIRA Software has an API for suspending a currently running rebalance operation, and preventing any further rebalances from being scheduled.

This procedure is only supposed to be used when JIRA Software Data Centre is suffering major performance problems due to a long-running rebalance operation flooding nodes with index replication requests. Suspending the rebalance will stop feeding the reindex queue, and the cluster should eventually recover. Please do not forget to enable rebalancing during off peak hours as soon as the instance is stable again.


Do not use this process unless advised by Atlassian Support.

Once rebalance has been suspended through this API, it will not continue again until it has been explicitly enabled through the same API/database.

Terminology: Suspended vs Disabled

Balancing can be both disabled and/or suspended

Disabled refers to a state where rebalancing has been disabled internally due to an in-progress forgreound reindex, or because JIRA Agile is shutting down. It cannot be user-controlled.

Suspended refers a state where an admin has explicitly told LexoRank to stop rebalancing. It can be user-controlled.

Rebalancing will not run if it is either disabled or suspended (i.e. both balancingDisabled and balancingSuspended must be set to 'false' for rebalance to run). In the context of this feature, we will focus on the suspended state.

Solution

All methods below require admin or sysadmin access for the instance.


  • To get the current status of rebalance, you may use this api : GET /rest/greenhopper/1.0/lexorank/balance

    curl -D- -u <Admin User>:<Admin Password> -X GET -H "Content-Type: application/json" <Base Url>/rest/greenhopper/1.0/lexorank/balance
    Balance status object
    {
        "lexoRankBalancingServiceStatus": {
            "balancingDisabled": false,
            "balancingSuspended": false,
            "balanceHandlerRunning": false
        },
        "lexoRankBalancerStatus": {
            "balancerLocked": false,
            "perFieldStatus": [
                {
                    "fieldName": "Rank",
                    "fieldId": 10005,
                    "numRankedIssues": 10000,
                    "percentComplete": 100,
                    "distribution": [
                        10000,
                        0,
                        0
                    ]
                }
            ]
        },
        "totalIssueCount": 10000
    }
  • Rebalancing can be either enabled or disabled with : PUT /rest/greenhopper/1.0/lexorank/balance

    Example : 

    curl -X PUT -H "Content-Type: application/json" 
    -d "{\"suspendBalancing\":\"true\"}" 
    -u <Admin User> <Base Url>/rest/greenhopper/1.0/lexorank/balance
  • Once Lexoranking is disabled, the 'Lexorank Management UI' will display the following warning :

  • To re-enable rebalancing, use this call (to be performed during off peak hours when the instance is stable)

    curl -X PUT -H "Content-Type: application/json" 
    -d "{\"suspendBalancing\":\"false\"}" 
    -u <Admin User> <Base Url>/rest/greenhopper/1.0/lexorank/balance


Last modified on Nov 25, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.