Remove more orphans when removing stray namespaces
This adds some extra orphan removals to the migration db/migrate/20161117114805_remove_undeleted_groups.rb
, hopefully solving the problem described in https://gitlab.com/gitlab-org/gitlab-ce/issues/25146.
@rdavila is it possible the user in question can test these changes and report back to see if it solves the problem? There may be more orphaned rows that we don't know about.
Merge request reports
Activity
Added 1 commit:
- dab0bdd4 - Remove more orphans when removing stray namespaces
Thanks @yorickpeterse I'm asking the customer to try your branch.
@rdavila @yorickpeterse The customer tried the migration, still failing see https://gitlab.com/gitlab-org/gitlab-ce/snippets/32660
assigned to @yorickpeterse
@MrChrisW @rdavila To prevent playing tennis with the customer, can we perhaps schedule some sort of call next week (with the customer)? We can then use this call to run a bunch of quick tests so we can figure out how to properly fix the migration.
Edited by yorickpeterse-staging@yorickpeterse sorry, I forgot to mention that customer is running EE if that changes something (I've created a new EE based branch with your fix for the customer). I will be happy to join the call if required. I'm not sure if @MrChrisW will be able to join due to his timezone, we may need to coordinate with other Service Engineer.
/cc @balameb
Edited by Rubén Dávila@rdavila Let's try and coordinate this - FYI customers TZ is "Aurora"
@dblessing @balameb This would be early morning (late for @yorickpeterse), ticket is https://gitlab.zendesk.com/agent/tickets/50703
Timezones
@MrChrisW I'm fine with doing this late in the evening.
@yorickpeterse What evenings this week work for you? I will coordinate with the customer and join the call with you since it will be too late/early for @MrChrisW
@dblessing Any evening is fine with me.
added 408 commits
-
dab0bdd4...6992ac11 - 407 commits from branch
master
- 3c5b6659 - Remove more orphans when removing stray namespaces
-
dab0bdd4...6992ac11 - 407 commits from branch
@yorickpeterse Customer tried the snippet scripts you shared. There were some errors. See attached. Any ideas?
@dblessing huh, it seems the
DELETE FROM lists
must come beforeDELETE FROM labels
.added 387 commits
-
3c5b6659...03e26def - 386 commits from branch
master
- 4c473b3d - Remove more orphans when removing stray namespaces
-
3c5b6659...03e26def - 386 commits from branch
@dblessing can they try the updated version of https://gitlab.com/snippets/33092? This one flips the labels/lists queries around, perhaps that will work.
added 270 commits
-
4c473b3d...a50cd9eb - 269 commits from branch
master
- ad33cee0 - Remove more orphans when removing stray namespaces
-
4c473b3d...a50cd9eb - 269 commits from branch
changed milestone to %8.15
@dblessing Any news? Has the customer tried the updated snippet mentioned above?
@yorickpeterse Is that new snippet to be run in concert with the others, or by itself?
@dblessing The snippet can be executed on its own.
cc @bpappas
From @bpappas:
I did a little digging around in the database, and simply deleted all rows in the "lists" table that are being referred to by the label_ids of the rows to be disposed of in the "labels" table. Here's the query I used; delete from lists where label_id IN (select id FROM labels WHERE group_id IN ( SELECT id FROM ( SELECT id FROM namespaces WHERE deleted_at IS NOT NULL ) namespace_ids ));
After that I was able to get the migration to run.
cc/ @yorickpeterse
@dblessing Ah that's good to hear. I'll try to adopt the query for this MR.
assigned to @DouweM
added 1371 commits
-
ad33cee0...4a463039 - 1370 commits from branch
master
- 63bd4969 - Remove more orphans when removing stray namespaces
-
ad33cee0...4a463039 - 1370 commits from branch
mentioned in commit 6688d695