-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
clear events related to schema cache updates (close #2542) #2585
clear events related to schema cache updates (close #2542) #2585
Conversation
-> hdb_catalog.hdb_schema_update_event always has one row and any metadata update query updates the the row with instance_id and occurred_at
Deploy preview for hasura-docs ready! Built with commit 4735a57 |
INSERT INTO hdb_catalog.hdb_schema_update_event | ||
(instance_id, occurred_at) VALUES ($1::uuid, DEFAULT) | ||
ON CONFLICT ((occurred_at IS NOT NULL)) | ||
DO UPDATE SET instance_id = $1::uuid, occurred_at = DEFAULT |
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.
Using INSERT
instead of UPDATE
because after initialise the hdb_catalog.hdb_schema_update_event
is empty and insert is required in that case. Using ON CONFLICT
clause to update
the already present single row.
Review app for commit e93b773 deployed to Heroku: https://hge-ci-pull-2585.herokuapp.com |
@@ -0,0 +1,103 @@ | |||
# This file was autogenerated by Stack. |
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.
stack.yaml.lock
is introduced in stack
build tool from 2.1.1
. It is recommended to put it in version control. Refer here to know more.
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.
LGTM, aside from the two minor comments.
Review app for commit 9da5384 deployed to Heroku: https://hge-ci-pull-2585.herokuapp.com |
Resolve Conflicts: server/src-exec/Migrate.hs
Review app for commit 4735a57 deployed to Heroku: https://hge-ci-pull-2585.herokuapp.com |
Review app https://hge-ci-pull-2585.herokuapp.com is deleted |
hasura#2585) schema syncing logic now requires only a single row in `hdb_schema_update_event`.
Description
Schema syncing on horizontal scaling introduced in #1574 uses a table to record schema cache update events. The table is populated with all events and cleaning never happens. This PR addresses this issue.
Affected components
Related Issues
Close #2542
Solution and Design
hdb_catalog.hdb_schema_update_event
tableinsert
andupdate
events on the tableNotes to Reviewer
Please look for line comments while you're reviewing
Steps to test and verify
Limitations, known bugs & workarounds