Run rake task to update current host stat table on version.gitlab.com
We need to execute the following rake tasks on the production instance of version.gitlab.com
: rake current_host_stat:seed_by_hosts
The goal of these rake tasks is to add/update current_host_stats
records with the correct data from hosts
, usage_data
, and version_checks
tables.
- for
rake current_host_stat:seed_by_hosts
, it can be ran 2 ways:- Against all
hosts
records at once (in batches of 1000):rake current_host_stat:seed_by_hosts
- Against predefined
id
ranges (to lessen the individual execution times per batch):-
rake current_host_stat:seed_by_hosts[1,1000]
- where1
is the startingid
inhosts
table, and1000
is the endingid
in thehosts
table. In this scenario, this would need ran in chunks up until the lastid
in thehosts
table, which is printed out in each run if arguments are passed as above.
-
- Decision on which one to run is up to the infrastructure team to decide. There are almost 1 million records in the
hosts
table.
- Against all