-
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
Merged
0x777
merged 7 commits into
hasura:master
from
rakeshkky:issue-2542-clean-schema-update-table
Jul 31, 2019
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
90c5300
wip: add single row constraint to hdb_catalog.hdb_schema_update_event
rakeshkky f95bbcb
use same instance id for telemetry and schema sync. And close #2542
rakeshkky e93b773
Merge branch 'master' into issue-2542-clean-schema-update-table
rakeshkky 1b5bdd8
use one definition to add triggers for INSERT and UPDATE events
rakeshkky 9da5384
Merge branch 'master' into issue-2542-clean-schema-update-table
rakeshkky ce85db0
Merge branch 'master' into issue-2542-clean-schema-update-table
rakeshkky 4735a57
Merge branch 'master' into issue-2542-clean-schema-update-table
rakeshkky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- Make hdb_catalog.hdb_schema_update_event as single row table | ||
-- Delete insert trigger and setup update trigger | ||
|
||
DELETE FROM hdb_catalog.hdb_schema_update_event; | ||
|
||
CREATE UNIQUE INDEX hdb_schema_update_event_one_row | ||
ON hdb_catalog.hdb_schema_update_event ((occurred_at IS NOT NULL)); | ||
|
||
ALTER TABLE hdb_catalog.hdb_schema_update_event DROP COLUMN id; | ||
|
||
DROP TRIGGER hdb_schema_update_event_notifier ON hdb_catalog.hdb_schema_update_event; | ||
|
||
CREATE TRIGGER hdb_schema_update_event_notifier_insert AFTER INSERT OR UPDATE ON | ||
hdb_catalog.hdb_schema_update_event FOR EACH ROW EXECUTE PROCEDURE | ||
hdb_catalog.hdb_schema_update_event_notifier(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# This file was autogenerated by Stack. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
# You should not edit this file by hand. | ||
# For more information, please see the documentation at: | ||
# https://docs.haskellstack.org/en/stable/lock_files | ||
|
||
packages: | ||
- completed: | ||
cabal-file: | ||
size: 2829 | ||
sha256: 0ef7cf19d08caa11c690a732f14e4b7159c46cdda1d9e66dceb6d4bedd9fd9c1 | ||
name: pg-client | ||
version: 0.1.0 | ||
git: https://github.com/hasura/pg-client-hs.git | ||
pantry-tree: | ||
size: 1051 | ||
sha256: fbab919039158f3714c3f0ac3d605d3fb9c85061517b4b9fc67147403b0b9975 | ||
commit: 16f27a134f12c4f24fee19d57f0ca179bdb4135b | ||
original: | ||
git: https://github.com/hasura/pg-client-hs.git | ||
commit: 16f27a134f12c4f24fee19d57f0ca179bdb4135b | ||
- completed: | ||
cabal-file: | ||
size: 3295 | ||
sha256: 5c53f2e67996f9e3f85002f95a929a04b85a44e00ffbf1b7a8c034c5098aa630 | ||
name: graphql-parser | ||
version: 0.1.0.0 | ||
git: https://github.com/hasura/graphql-parser-hs.git | ||
pantry-tree: | ||
size: 1771 | ||
sha256: 6e506a5dbf965325c515efc523e63bbc15640c994a5dbe21448d328c7ba619a1 | ||
commit: 1ccdbb4c4d743b679f3141992df39feaee971640 | ||
original: | ||
git: https://github.com/hasura/graphql-parser-hs.git | ||
commit: 1ccdbb4c4d743b679f3141992df39feaee971640 | ||
- completed: | ||
cabal-file: | ||
size: 1253 | ||
sha256: d0356b65cbe17a2fecf9334aa133de238161ef9c22af015d67ab622e08eb8ed1 | ||
name: ci-info | ||
version: 0.1.0.0 | ||
git: https://github.com/hasura/ci-info-hs.git | ||
pantry-tree: | ||
size: 512 | ||
sha256: 78d311887af8c825aa21563635fbe31503febcc490e0e5d81919835d83ef9046 | ||
commit: ad6df731584dc89b72a6e131687d37ef01714fe8 | ||
original: | ||
git: https://github.com/hasura/ci-info-hs.git | ||
commit: ad6df731584dc89b72a6e131687d37ef01714fe8 | ||
- completed: | ||
hackage: ginger-0.8.4.0@sha256:21c3051af3c90af39c40a50400c9a1a0fcccb544528e37cde30bdd30048437d8,3151 | ||
pantry-tree: | ||
size: 1375 | ||
sha256: f8a7cb091ea4d8011bd530f83a22941a009d97ee7ccd4c93d0528aa72f3636ea | ||
original: | ||
hackage: ginger-0.8.4.0 | ||
- completed: | ||
hackage: select-0.4.0.1@sha256:d409315752a069693bdd4169fa9a8ea7777d814da77cd8604f367cf0741de295,2492 | ||
pantry-tree: | ||
size: 1256 | ||
sha256: b6ae36ccba2a7cdd1ad130575931364002682e532d7043da62771e58294ddb7a | ||
original: | ||
hackage: select-0.4.0.1 | ||
- completed: | ||
hackage: primitive-extras-0.7.1@sha256:23905c57089418b1a2d324cfee3e81bbd5a344a0fa56a827867b2dce275fdb5e,2945 | ||
pantry-tree: | ||
size: 1181 | ||
sha256: f788dae21ca4f0d0377d97a5ba7fd008d4b0af8991a745f94c29f2caa11dc6bd | ||
original: | ||
hackage: primitive-extras-0.7.1 | ||
- completed: | ||
hackage: stm-hamt-1.2.0.2@sha256:18126db7bf2d9c967a6020c677b3005dd957a4c39d69aeaea3c29c90de8f6124,3972 | ||
pantry-tree: | ||
size: 1009 | ||
sha256: ef426797655d6b4b9238b1200c4129d44e91f996f26b92a035b1333b8b8a6f62 | ||
original: | ||
hackage: stm-hamt-1.2.0.2 | ||
- completed: | ||
hackage: stm-containers-1.1.0.4@sha256:f83a683357b6e3b1dda3e70d2077a37224ed534df1f74c4e11f3f6daa7945c5b,3248 | ||
pantry-tree: | ||
size: 761 | ||
sha256: 059c5a2d657d392aca0a887648f57380d6321734dc8879c056a44d4414308ac6 | ||
original: | ||
hackage: stm-containers-1.1.0.4 | ||
- completed: | ||
hackage: reroute-0.5.0.0@sha256:3360747cdc700c9808a38bff48b75926efa443d4af282396082329a218a8d9d3,2446 | ||
pantry-tree: | ||
size: 660 | ||
sha256: 52afcff0a5dba2fb746be4fa8cfa56cf774272872b61130537fe0e7ad463c0cd | ||
original: | ||
hackage: reroute-0.5.0.0 | ||
- completed: | ||
hackage: Spock-core-0.13.0.0@sha256:06e007f23c47bdda52d2927da54160d73f1b6f51a977f3ca9087275698db8f0a,3400 | ||
pantry-tree: | ||
size: 1113 | ||
sha256: 86140298020f68bb09d07b26a6a6f1666fc3a02715d7986b09150727247a1a84 | ||
original: | ||
hackage: Spock-core-0.13.0.0 | ||
snapshots: | ||
- completed: | ||
size: 498167 | ||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/20.yaml | ||
sha256: cda928d57b257a5f17bcad796843c9daa674fef47d600dbea3aa7b0e49d64a11 | ||
original: lts-13.20 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofUPDATE
because after initialise thehdb_catalog.hdb_schema_update_event
is empty and insert is required in that case. UsingON CONFLICT
clause toupdate
the already present single row.