Unable to start re-indexing after DB migration

Hi Team,

We recently migrated our enterprise sonarqube app to AWS, After the migration of DB , we started our application, but re-indexing haven’t started immediately, We have to stop the sonar , delete es7 folder and restart sonar, then it started re-indexing for DB.

1- How can we make sure indexing is start after application is deployed ? We first migrated Db then stated the app.
2- Also my Db guy requested me to use currentSchema to point to public , jdbc_url: “jdbc:postgresql://.amazonaws.com:5432/sonar?currentSchema=public” , we use public as our schema, does this fix the re-indexing ?
3- How can I automate Re-Indexing , should I add “deleting es7 folder” task in ansible playbook to automate this or there is any api call to do this ?

Thank you

Hi,

Indices from previous versions are only reused if you’ve configured the Elasticsearch storage path. The point of doing that is to speed up upgrades - so you don’t have to wait for everything to be reindexed. But if that’s not a desirable behavior for you, you can revert to the default behavior and Elasticsearch indices will automatically be recreated with every new version.

And to answer your question, this shouldn’t have anything to do with which schema you’re using, although we do recommend that SonarQube have its own schema, all to itself. Using the public schema - where other users may interfere with SonarQube’s data or schema - is asking for trouble.

 
HTH,
Ann