-
Notifications
You must be signed in to change notification settings - Fork 2.8k
remove event from the saved locked events after processing it #4932
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
remove event from the saved locked events after processing it #4932
Conversation
| removeEventFromLockedEvents eventId = do | ||
| liftIO $ atomically $ do | ||
| lockedEvents <- readTVar _eeCtxLockedEvents | ||
| writeTVar _eeCtxLockedEvents $ Set.delete eventId lockedEvents |
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.
It's probably fine, but can you add a strictness annotation here?:
writeTVar _eeCtxLockedEvents $! Set.delete eventId lockedEvents
^
I'm always a little worried about writing thunks to mutable variables
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.
Oh yes..I didn't realize that I'm writing a thunk to a mutable variable. I will also change it where we are saving the locked events.
jberryman
left a comment
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.
This LGTM except for the $! if you agree.
|
Review app for commit 78f9444 deployed to Heroku: https://hge-ci-pull-4932.herokuapp.com |
|
Review app for commit 2aec3ce deployed to Heroku: https://hge-ci-pull-4932.herokuapp.com |
|
Review app https://hge-ci-pull-4932.herokuapp.com is deleted |
…#4932) * remove event from the saved locked events after processing it
Description
In #4214, we introduced unlocking of events when graceful shutdown is initiated. This is done by maintaining an in-memory set of locked events. However, after an event has been processed, it's not being removed from the set of locked events. This PR fixes that problem.
Changelog
CHANGELOG.mdis updated with user-facing content relevant to this PR.Affected components
Related Issues
Solution and Design
Steps to test and verify
Limitations, known bugs & workarounds
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
run_sqlauto manages the new metadata through schema diffing?run_sqlauto manages the definitions of metadata on renaming?export_metadata/replace_metadatasupports the new metadata added?GraphQL
Breaking changes
No Breaking changes
There are breaking changes:
Metadata API
Existing
querytypes:argspayload which is not backward compatibleJSONschemaGraphQL API
Schema Generation:
NamedTypeSchema Resolve:-
nullvalue for any input fieldsLogging
JSONschema has changedtypenames have changed