UserStore: Add migration logic and migration interpreter - #5324
Draft
akshaymankar wants to merge 31 commits into
Draft
UserStore: Add migration logic and migration interpreter#5324akshaymankar wants to merge 31 commits into
akshaymankar wants to merge 31 commits into
Conversation
akshaymankar
force-pushed
the
user-pg-migration-code
branch
from
July 9, 2026 12:35
3e94d0b to
4dcb50c
Compare
akshaymankar
force-pushed
the
user-pg-migration-code
branch
6 times, most recently
from
August 3, 2026 09:25
c109be7 to
acf0807
Compare
akshaymankar
force-pushed
the
user-pg-migration-code
branch
2 times, most recently
from
August 4, 2026 15:05
51dd43c to
1f3a077
Compare
blackheaven
requested changes
Aug 4, 2026
| mkUserRowPG id_ cass@UserRowCass {..} isHandleClaimed richInfo = run . runError $ do | ||
| pgName <- note UserHasNoName cass.name | ||
| pgActivated <- note UserHasNoActivated cass.activated | ||
| createdAt <- note UserHasNoActivated $ writetimeToUTC <$> cass.activatedWriteTime |
Contributor
There was a problem hiding this comment.
Something is odd here, IIRC activatedWriteTime is the last write time.
Member
Author
There was a problem hiding this comment.
Its the write time of the activated field, I think its only gets written when the user is activated, which is what we can use as an approximation for when the user was created.
blackheaven
requested changes
Aug 4, 2026
| ) => | ||
| Duration -> Prometheus.Counter -> Prometheus.Vector Text Prometheus.Histogram -> UserId -> Sem r () | ||
| migrateUser migTimeout migCounter migDuration uid = | ||
| withExclusiveMigrationLockAndTimeout migTimeout migDuration [uid] $ do |
Contributor
There was a problem hiding this comment.
Is it fine to have a global lock?
Member
Author
There was a problem hiding this comment.
What do you mean global?
Contributor
There was a problem hiding this comment.
For all users instead of one by one.
Member
Author
There was a problem hiding this comment.
The migration is happening for one user at a time, so I think it makes sense for the lock to be for that user.
akshaymankar
force-pushed
the
user-pg-migration-code
branch
from
August 19, 2026 10:43
06b20b3 to
bb68426
Compare
brig: use the dummy implementation
local-setup: Increase postgresql max connections (CI setup already has more)
Deletes are really slow
akshaymankar
force-pushed
the
user-pg-migration-code
branch
from
August 20, 2026 08:58
bb68426 to
150c8b9
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
changelog.d