Skip to content

(VDB-1228) Median kiss + diss transformers#143

Merged
gslaughl merged 1 commit intostagingfrom
vdb-1228-kiss-diss-transformers
Apr 3, 2020
Merged

(VDB-1228) Median kiss + diss transformers#143
gslaughl merged 1 commit intostagingfrom
vdb-1228-kiss-diss-transformers

Conversation

@gslaughl
Copy link
Copy Markdown
Contributor

No description provided.

@gslaughl gslaughl force-pushed the vdb-1228-kiss-diss-transformers branch 3 times, most recently from c0b8d54 to cd66873 Compare March 11, 2020 19:08
@gslaughl gslaughl force-pushed the vdb-1228-kiss-diss-transformers branch 8 times, most recently from c50fa00 to 0934498 Compare March 25, 2020 17:09
CREATE TABLE maker.bid_event
(
log_id BIGINT PRIMARY KEY REFERENCES event_logs (id) ON DELETE CASCADE,
log_id BIGINT PRIMARY KEY REFERENCES event_logs (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line fixes the flaky test we've been seeing, by specifying that the CASCADE DELETE should happen at the end of the transaction. This way we won't run into the issue where a trigger is trying to update a row that was already deleted, because the row won't have been deleted yet.

Here are some docs about deferrable constraints if you're interested

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we want to modify the earlier migration here. Is it possible to update this column in a new migration?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha oh yeah 🤦‍♂

Can def put this into a separate migration



-- +goose Down
DROP TABLE maker.median_kiss_single;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an issue right now but if this is merged after the backfill stuff then we'll need updated timestamps on here to make sure they come after that. Mostly just posting as a general reminder to make sure all new migrations are the latest against staging for every PR

@gslaughl gslaughl force-pushed the vdb-1228-kiss-diss-transformers branch from 0934498 to 7baa4ad Compare April 3, 2020 15:53
Copy link
Copy Markdown
Contributor

@rmulhol rmulhol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :shipit:

. "github.com/onsi/gomega"
)

// TODO: Update once a diss event has happened
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obsolete?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking in etherscan I still can't find any diss events, unfortunately

@gslaughl gslaughl merged commit 838cf5e into staging Apr 3, 2020
@zdumitru zdumitru deleted the vdb-1228-kiss-diss-transformers branch April 20, 2022 10:47
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.

3 participants