Change the type of column geo_node_statuses.last_event_id from integer to bigint
Some customers with Geo secondaries are getting 500 errors when reporting their status with POST /api/v4/geo/status due to the value of last_event_id in the GeoNodeStatus table exceeding the max value for an ActiveModel::Type::Integer:
This is due to the column type fo geo_node_statuses.last_event_id being integer, but geo_event_log.id
is bigint.
It is unclear if there is a controlled way to reset the geo_event.id
sequence to zero without losing events. However, Since geo_node_statuses.last_event_id
is not an FK or PK, we can change the column type from integer to bigint in 16.4 following https://docs.gitlab.com/ee/development/database/avoiding_downtime_in_migrations.html#changing-column-types
On a follow-up issue we should also evaluate the Geo tracking tables to prevent the overflow risk for some tables with integer primary keys (PK). &9793