-
Bug
-
Resolution: Unresolved
-
Low
-
9.2.6
-
1
-
Severity 3 - Minor
-
-
Warranty
Issue Summary
User cannot create question, using Confluence Question plugin, topic suggestion is loading but never finishes.
Steps to Reproduce
- Set up OpenSearch service, and use OpenSearch as the search platform
- Install Confluence 9.2.6 with Confluence Questions plugin version 5.0.9. Use OpenSearch as the search platform
- Create a new question with text and a mandatory topic (e.g., "Jira 2"), save, flush the queue if needed, and verify it appears under Questions.
- Open the same question in two browser tabs (or simulate two users editing) and click editing topic so that topic field is in edit mode.
- In Tab 1, remove a topic and save.
- In Tab 2, remove another topic and save.
- Go to create new question page
Expected Results
The question and topics are updated consistently without errors. In the create question page, topic field can suggest topics, and the user can continue creating or editing questions.
Actual Results
In the create question page, a 500 error is returned in the web console. Topics disappear from the Topics page, and creating new questions shows a loading spinner that never resolves.
Exception can be found in logs like following
"type": "search_phase_execution_exception", "reason": "all shards failed", "caused_by": { "type": "illegal_argument_exception", "reason": "field value function must not produce negative scores, but got: [-1.0] for field value: [-1.0]", "caused_by": { "type": "illegal_argument_exception", "reason": "field value function must not produce negative scores, but got: [-1.0] for field value: [-1.0]" } },
This can be verified by running this SQL query to the DB
-- this should return 0 rows -- as we expecting all cq-topic-question-count to be non-negetive -- otherwise the 'cq-topic-question-count' data is broken in DB select * from contentproperties where propertyname = 'cq-topic-question-count' and longval < 0;
Workaround
Update the database to remove negative values in the `CQ_TOPIC_QUESTION_COUNT` field:
update contentproperties set longval = 0 where propertyname = 'cq-topic-question-count' and longval < 0;
Then run a full Confluence re-index.
After re-index, topics reappear and new questions can be created successfully.