We recently had a user that pushed some changes to a new branch and the corresponding sonarqube scan contained “1 New Bug” and “1 New Vulnerabilities”. See the following screenshot:
Other symptoms include certain projects not showing up in search results, and when we favorite a project it does not show up in our favorites.
We have checked the database and the values are present though.
We were wondering if an elasticsearch reindex (deleting sonar/data/es6) would help us.
Thanks!
James
we’ve removed the sonar/data/es6/nodes folder and the index is rebuilding, but it is very slow. We are showing 27615 pending tasks, and the rate seems to be one task every 5 minutes. We’re attaching our ce.log showing the log lines every 5 minutes. Is there any way to speed this up? We appreciate any help here. Thank you
James sonar_ce.log (15.5 KB)
Is anyone available to help? Unfortunately we haven’t made much progress on why our search is broken and why the Issues tab shows 0 bugs even though the Overview says they exist. Thank you
Apologies for the late reply. You can speed up the project reload process by ensuring your rebuild indexes and refresh statistics on your database. Please speak with your DBA on how to do these actions. Then perform the ES reindex once more and it should be faster.
If you speaking about the strange behavior as mentioned in the OP, then it is an issue we are progressively working on to improve ES index stability. Currently, as of SonarQube 9.8, we provide a special web API to perform ES reindex on a single project (instead of the entire SonarQube instance via deletion of $SQ_HOME/data/es7 folder and restarting SonarQube), POST api/issues/reindex (see [SONAR-17497] - Jira for more info):