This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Merged
Conversation
mrnugget
approved these changes
Mar 30, 2023
Contributor
mrnugget
left a comment
There was a problem hiding this comment.
Do we need to backport this?
Comment on lines
+169
to
+171
| for i := 0; i < 10; i++ { | ||
| err = migrator.Up(ctx) | ||
| require.NoError(t, err) |
Contributor
There was a problem hiding this comment.
Is this correct, calling migrator.Up 10 times?
Contributor
Author
There was a problem hiding this comment.
Yes, if you look at the Up implementation, it only executes the SQL query, nothing else.
2 tasks
github-actions bot
pushed a commit
that referenced
this pull request
Mar 30, 2023
Turns out our progress was not reporting correctly, because certain rows were not migrated. This was caused by bad query in migrator itself, because if there were no permissions (empty `object_ids_ints` array), we had no rows in the `s` set of the subquery. This `s` subquery was subsequently used to update the `migrated` column, but we should have instead used the `candidates` subquery. Hope the description makes sense, code change should be self explanatory. ## Test plan - [x] Unit tested - [x] Verify on S2 that this is the case (cherry picked from commit 9056cbd)
coury-clark
pushed a commit
that referenced
this pull request
Mar 30, 2023
Turns out our progress was not reporting correctly, because certain rows were not migrated. This was caused by bad query in migrator itself, because if there were no permissions (empty `object_ids_ints` array), we had no rows in the `s` set of the subquery. This `s` subquery was subsequently used to update the `migrated` column, but we should have instead used the `candidates` subquery. Hope the description makes sense, code change should be self explanatory. ## Test plan - [x] Unit tested - [x] Verify on S2 that this is the case <br> Backport 9056cbd from #50147 Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns out our progress was not reporting correctly, because certain rows were not migrated. This was caused by bad query in migrator itself, because if there were no permissions (empty
object_ids_intsarray), we had no rows in thesset of the subquery. Thisssubquery was subsequently used to update themigratedcolumn, but we should have instead used thecandidatessubquery.Hope the description makes sense, code change should be self explanatory.
Test plan