-
Notifications
You must be signed in to change notification settings - Fork 2.8k
schema cache syncing without relying on a Postgres table #6173
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
Conversation
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.
I can't reliably judge the syncing logic itself. It seems to me that the core of tho changes are in fetchLastUpdate, recordSchemaUpdate, and notifySchemaCacheSync. With the old fetchLastUpdate and recordSchemaUpdate, I think I understood the logic: record sends a message to all other graphql-engine instances, and fetch received messages. Is notify the new record or the new fetch? I believe it's the former. If so, where's the new fetch? Where's the code that receives these PG notifications?
Edit: Sorry, perhaps the failing PR was just a flake. [This used to say: @rakeshkky, please invite reviewers after you got the PR to pass CI. Otherwise, you ensure that the reviewer does not review the code that will end up getting merged.]
|
@0x777 Please take a look at this PR. You have a better context of the schema syncing process than other reviewers. |
As suggested by @abooij
|
Deploy preview for hasura-docs ready! Built with commit 4c4f9e4 |
An incremental PR towards # 5797 (OSS repo) * schema cache syncing without relying on a Postgres table Co-authored-by: rakeshkky <12475069+rakeshkky@users.noreply.github.com> Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com> Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com> GITHUB_PR_NUMBER: 6173 GITHUB_PR_URL: #6173 * fix pro compile issues Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com> Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com> GitOrigin-RevId: 055b06a
|
Thanks for your contribution! Your changes have been merged successfully. |
Description
This is an incremental PR towards #5797. It avoids using
hdb_cataog.hdb_schema_updatetable and associated trigger to notify schema syncing events to other server instances. Instead it is achieved in a much simpler way by directly usingpg_notifyprocedure to publish event payload.Other things this PR does:-
initialiseCtxfunction is only used inservecommandGlobalCtxtype for essentials required for all graphql-engine commandsChangelog
CHANGELOG.mdis updated with user-facing content relevant to this PR. If no changelog is required, then add theno-changelog-requiredlabel.Affected components
Limitations, known bugs & workarounds
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
Breaking changes