Upgrade to SonarQube 9.8

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 9.5
  • what are you trying to achieve
    It is an upgrade to v9.8.
  • what have you tried so far to achieve this
    Gone through release notes(9.8) which says that v9.8 supports only postgreSQL >= 11 and support for postgreSQL 9.6 is dropped. We are in postgreSQL9.6. If I understood the upgrade process correctly, I need to do the following steps.
  1. Migrate postgreSQL 9.6 data to postgreSQL 11
  2. Test SonarQube 9.5 able to connect the updated DB (not sure if SonarQube 9.5 has a database driver to connect to postgreSQL11 -please suggest)
  3. Upgrade SonarQube 9.5 to 9.8
    Please let me know if any other steps I need to consider during upgrade.

Thanks
Jiju

Hey there.

SonarQube v9.5 supports Postgres 11, so no worries there.

Take note of this guide if you face any performance issues after upgrading the Postgres version:

https://community.sonarsource.com/t/sonarqube-becomes-slow-after-postgresql-upgrade/37925/2

Otherwise, just follow the Upgrade Guide for your SonarQube version!

@Colin,
We have did the upgrade of DB to postgresql11 and it is working. For performance VACCUM was run on database. Looks it improved. But still for some projects it is taking more time than it took while we were in postgreSQL9.6. Like the ones finished in 5 mins was waiting for 30 mins to finish the execution and times out. I am thinking of two possible scenarios causing a performance issue.
1.Our current db cluster is a Patroni cluster which sits behind an A10 load balancer. Does Sonarqube fully supports this kind of backend. Is there any more config required?
( PS: To address the timeouts we moved away from A10 and directly pointed to the databaseURL which fixed the issue temporarily. But we want to put the loadbalancer back into action.)
2. Would a db upgrade cause any re-indexing in Elastic search of sonar. Do I need to do any specific action on ES engine after upgrade.

My sincere apologies for not responding to you after the upgrade. Appreciate your guidance on this.

Thanks, Jiju

Hey there.

SonarQube doesn’t specifically support anything related to clustering/high-availability on the database side. It’s only aware of the JDBC URL it’s given, and whatever the Postgres driver handles.

If you can link the performance issue directly to the load balancer, which it sounds like you can:

Then it sounds like a performance issue on your load balancer.

No action is needed, unless you experience any data incongruencies. It would not have an impact on database performance.

One user also found they needed to run a VACUUM FULL ANALYZE on each individual table. You might try this.

Thanks Colin for your advise on this. Let me check the load balancer side and also run VACCUM FULL ANALYSE.