Resolve "Detect and truncate unnecessary data in decomposed database"
What does this merge request do and why?
Now that we have two databases main
& ci
, we need to
- truncate data on
ci
database, for tables belonging to themain
database. - truncate data on
main
database, for tables belonging to theci
database.
We have rake tasks to do this, but it is currently not integrated with the GDK.
With this MR, we run these rake tasks to truncate legacy data on running gdk reconfigure
.
But, we also do not want to run this truncation process all the times when gdk reconfigure
is run. This is only a one time job, so the first time this is run, we write to an empty file in .cache/.truncate_tables
, and if this file exists, we do not run the truncation process again.
Screenshots:
On running gdk reconfigure
On first run:
On subsequent runs:
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Closes #1640 (closed)
Edited by Manoj M J