Skip to content
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

Merged
merged 8 commits into from
Mar 19, 2024
Merged

Fix migration race #50

merged 8 commits into from
Mar 19, 2024

Conversation

tommyengstrom
Copy link
Owner

  • Upgrade to lts-22.13
  • Fix streamly code to use new interface
  • Ensure a we use an exclusive lock during event migrations.

Comment on lines +41 to +45
getEventStream ff =
Stream.bracketIO
(getEventList ff)
(const (pure ()))
Stream.fromList
Copy link
Contributor

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)

Copy link
Contributor

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.

Comment on lines 133 to 134
-- Using stripesAndResources because the default is crazy:
-- "Set num resources to cores and crash if there are fewer stripes"
Copy link
Contributor

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?

Copy link
Contributor

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)
Copy link
Contributor

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?

Comment on lines +41 to +45
getEventStream ff =
Stream.bracketIO
(getEventList ff)
(const (pure ()))
Stream.fromList
Copy link
Contributor

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.

@tommyengstrom tommyengstrom merged commit 89b0169 into master Mar 19, 2024
1 check passed
@tommyengstrom tommyengstrom deleted the fix-migration-race branch March 19, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants