Description
With updates in RANGER-4803, Ranger will store admin audit records in x_trx_log_v2 table. Prior to this, x_trx_log table was used to store these records. To make earlier admin audits available to updated Ranger, existing entries in x_trx_log should be migrated to x_trx_log_v2 table. Here are few notes to take into account:
- For a given admin action, like create/update/delete of a policy, multiple rows are created in x_trx_log table - one row for each updated attribute.
- For a given admin action, a single row is created in x_trx_log_v2
table. This row captures details of all updated attributes in json format. - Migration utility should merge all rows for a given admin action, identified by column x_trx_log.trx_id, into a single record in x_trx_log_v2 table. x_trx_log_v2.change_info column should be populated with contents of following columns in multiple x_trx_log rows: attr_name, prev_val, new_val.
- The utility should provide an option to migrate only a subset of entries in x_trx_log table - for example, for a given time period (last 3 months, last 1 year). This will help avoid migrating older records that are of no interest to the customer.
Attachments
Issue Links
- links to