Project

General

Profile

Actions

action #109849

closed

coordination #109846: [epic] Ensure all our database tables accomodate enough data, e.g. bigint for ids

Migrate job_modules table to bigint

Added by okurz over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2022-04-12
Due date:
% Done:

0%

Estimated time:

Description

Motivation

See #109836 where we found all jobs on OSD are incomplete with the reason 'Reason: api failure: 400 response: OpenQA::Schema::Result::Jobs::insert_module(): DBI Exception: DBD::Pg::st execute failed: ERROR: integer out of range [for Statement " INSERT INTO job_modules ( job_id, name, category, script, milestone, important, fatal, always_rollback, t_created, t_u…' on 2022-04-12 morning due to hitting the integer limit of the job module id. This was mitigated for now on OSD with manual database alterations but needs to be accomodated in our table creations including migrations of existing instances. Here we should focus on the job_modules table as the first one

Acceptance criteria

  • AC1: job_modules table uses bigint for idx rather than integer
  • AC2: Existing instances of openQA are migrated/upgraded according to AC1
  • AC3: No severe performance regression
  • AC4: The migration of existing instances finishes in a reasonable time (downtime of some minutes is ok)
Actions #1

Updated by mkittler over 2 years ago

  • Assignee set to mkittler
Actions #2

Updated by mkittler over 2 years ago

  • Status changed from New to Feedback
Actions #3

Updated by mkittler over 2 years ago

  • Status changed from Feedback to Resolved

Both production instances have been updated and as far as I can tell the migration worked well:

openqa=> \d job_modules
                                              Tabelle »public.job_modules«
     Spalte      |             Typ             | Sortierfolge | NULL erlaubt? |               Vorgabewert               
-----------------+-----------------------------+--------------+---------------+-----------------------------------------
 id              | bigint                      |              | not null      | nextval('job_modules_id_seq'::regclass)
Actions

Also available in: Atom PDF