-
Bug
-
Resolution: Fixed
-
Medium (View bug fix roadmap)
-
6.5.0, 6.6.0
-
None
-
6.05
-
Description
This bug is caused by specific collation type such as Danish/Norwegian, Swedish/Finish treat the alphabetical ordering quite differently. For example, in Danish/Norwegian two letters "aa" are treated as a single letter, and comes after "z" in the alphabet. This causes the lexorank ordering to be wrong.
Symptoms
The following error message is seen in JIRA Agile when attempting an issue ranking operation.
Diagnosis
-
- Check your collation type if it affects alphabetical ordering, ie Danish/Norwegian
- Run the following query :
SELECT 'ROWS_IN_BUCKET_0', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '0|%' GROUP BY "FIELD_ID" UNION SELECT 'ROWS_IN_BUCKET_1', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '1|%' GROUP BY "FIELD_ID" UNION SELECT 'ROWS_IN_BUCKET_2', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '2|%' GROUP BY "FIELD_ID" ORDER BY "FIELD_ID";
- The results should show that there is a balancing going on (there will be 2 rows of results, with a number of issues in one bucket and another number in the other bucket)
- Enable DEBUG Logging for the balancer : com.atlassian.greenhopper.service.lexorank.balance
- From there, we can see that there is something wrong with the balancer. Notably, this line:
New rank[1|hzzzvz:] for issue[id=31321] for rank field[id=10890] already exists, retrying balance oepration
This error shows that the Balancer is trying to insert a rank value that already exists.
Workarounds
Please refer to Unable to rank and/or balancer fails to complete due to incorrect database collation
- relates to
-
JSWSERVER-11162 Indexing after installing JAG for the first time takes ages.
-
- Closed
-
-
JRASERVER-39970 Jira needs to check the collation of the DB before it starts
- Closed
- mentioned in
-
Page No Confluence page found with the given URL.
-
Page No Confluence page found with the given URL.
-
Page No Confluence page found with the given URL.
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- was cloned as
-
SW-752 Loading...
Form Name |
---|
I recently upgraded to Agile 6.6.41 and I encountered this exact problem. It seems that your collation checks don't detect all special cases, in Czech collation, CH comes after H. I had to set the log to DEBUG, because there was no warning message like described above.
For PostgreSQL (I have 9.3), the workaround seems to be this (the workaround in the KB article only mentions changing the collation for the whole database which was not acceptable for me):