-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix migration race #50
Conversation
tommyengstrom
commented
Mar 19, 2024
- Upgrade to lts-22.13
- Fix streamly code to use new interface
- Ensure a we use an exclusive lock during event migrations.
91c5a2a
to
79dd32a
Compare
getEventStream ff = | ||
Stream.bracketIO | ||
(getEventList ff) | ||
(const (pure ())) | ||
Stream.fromList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this just be fromEffect?
As in, fromEffect (getEventList ff)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok nvm, you are right.
-- Using stripesAndResources because the default is crazy: | ||
-- "Set num resources to cores and crash if there are fewer stripes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a link to scrive/pool#16 to add some context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah and the comment is backwards. It's 'set striped to num cores and crash if there are fewer resources than stripes'.
S.unfoldrM | ||
step | ||
cursor | ||
-- cursor <- liftIO $ Cursor.declareCursor conn (getPgQuery q) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason you want to leave the comment?
getEventStream ff = | ||
Stream.bracketIO | ||
(getEventList ff) | ||
(const (pure ())) | ||
Stream.fromList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok nvm, you are right.
5d1d176
to
b95c58b
Compare