Skip to content
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

[WIP] Check for concurrent edits of showplans #1191

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markspolakovs
Copy link
Member

Add a simple mechanism to check if two people are editing a showplan at the same time, by storing the time it was last modified.

Will go together with a WebStudio change that will, when opened, get the last modified time from the server, and then send it back on every updateShowPlan call. The server will only accept the change if the time still matches (guarded by a SELECT FOR UPDATE), otherwise WebStudio will force the user to reload.

This can be a bit annoying, but the alternative is showplan corruption. Perhaps we can make WebStudio periodically poll for new changes to make it less annoying.

ADD COLUMN showplan_last_modified TIMESTAMPTZ DEFAULT NULL;

UPDATE myradio.schema
SET value = 14
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
SET value = 14
SET value = 19

wat

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.

1 participant