Project

General

Profile

Bug #4832

Updated by Nicolas CHARLES over 10 years ago

Since #4831, type of reports have changed from integer to bigint. 

 We will not migrate table automatically: it can take a very long time to perform and therefore could not fit in an automatic migration script. 

 We will provide a script available in /opt/rudder/... that will make the migration whenever the user is ok to run it. 

 In the migration process we will check if there is a still a table that needs migration and warn the user that there is something he can do! 

 there is 3 tables to look at : ruddersysevents (id), archivedruddersysevents (id), and statusUpdated (lastId) 

 The process to update reports table is more complicated: 


 * Ask if the user wish to keep all the previous reports or not 
 ** if not keeping the previous reports, ask confirmation 
 * In a transaction: 
 ** Rename table to old_table 
 ** drop all indexes except the index on nodes 
 ** create new "table" with bigint as id 
 * Outside the transaction: 
 *    create new indexes on the new table 
 * If the user wish to keep all reports 
 ** copy everything 
 * If the user does not wish to keep all reports 
 ** copy latest 1000 reports of each node in the table 
 *** the copy is node by node, with display of the amout of node copied, and reports are dropped each time a copy is made 
 ** * Drop "old_table" 

Back