Update rake tasks to support separate index for issues

The following rake tasks need to be updated to support multiple indexes. This work can be done in multiple MRs.

ee/lib/tasks/gitlab/elastic/test.rake

  • gitlab:elastic:test:index_size
  • [-] gitlab:elastic:test:index_size_change (calls gitlab:elastic:test:index_size and gitlab:elastic:index)

ee/lib/tasks/gitlab/elastic.rake

  • gitlab:elastic:index
  • gitlab:elastic:create_empty_index
  • gitlab:elastic:delete_index
  • gitlab:elastic:recreate_index
  • [-] gitlab:elastic:reindex_cluster (calls back end code which will be fixed in another issue)
  • [-] gitlab:elastic:clear_index_status (no changes needed)
  • [-] gitlab:elastic:projects_not_indexed (no changes needed)
  • [-] gitlab:elastic:mark_reindex_failed (calls back end code which will be fixed in another issue)

Existing rake tasks have an target_name argument which will allow them to be used to also interact directly with the issues or default index.

Epic order

  1. Remove joins from the Elasticsearch query for project/group scoped issues search
  2. De-normalize the issue permission data. <-- will include migration and can be done in multiple MRs
  3. Remove joins from the Elasticsearch query for globally scoped issues search
  4. Migration to copy issue data to new index
  5. Migration to remove issue data from combined index **
  6. Rake task changes to support new index **
  7. Backend changes for supporting new indexes during Zero Downtime Re-indexing **
  8. Admin UI changes to support new index (any time after new index created/data migrated to it)

** must be released in conjunction with the Migration to copy issue data to new index

Edited by Terri Chu