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

add readonly mode to production console #3324

Merged
merged 1 commit into from Apr 20, 2019
Merged

add readonly mode to production console #3324

merged 1 commit into from Apr 20, 2019

Conversation

grosser
Copy link
Contributor

@grosser grosser commented Apr 18, 2019

Alternative for #3323 which can lock up the whole DB

rails c
Loading development environment (Rails 5.2.2.1)
Running in readonly mode. Use Samson::ReadonlyDb.disable to switch to writable.
samson(readonly dev)> Samson::ReadonlyDb.disable
samson(dev)>

@zendesk/compute @zendesk/bre

@grosser grosser requested a review from a team as a code owner April 18, 2019 05:54
lib/samson/readonly_db.rb Outdated Show resolved Hide resolved
@grosser
Copy link
Contributor Author

grosser commented Apr 19, 2019 via email

@grosser grosser force-pushed the grosser/readonly2 branch 2 times, most recently from e73b130 to 234d42b Compare April 19, 2019 08:40
@adammw
Copy link
Contributor

adammw commented Apr 19, 2019

not sure if possible, but I wonder if wrapping it in a transaction as well would make doubly-sure that nothing bad sneaks through...

@adammw
Copy link
Contributor

adammw commented Apr 19, 2019

also does transactions still work in here, do you have to allow "START TRANSACTION" and "ROLLBACK"?

Copy link
Contributor

@sathishavm sathishavm left a comment

Choose a reason for hiding this comment

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

+1

@grosser
Copy link
Contributor Author

grosser commented Apr 20, 2019

we decided against transactions in the sandbox PR because they can cause global blocking, so I don't want to bring them back

@grosser grosser merged commit 7690167 into master Apr 20, 2019
@grosser grosser deleted the grosser/readonly2 branch April 20, 2019 02:49
@grosser
Copy link
Contributor Author

grosser commented Apr 20, 2019

🍿 can't wait for this to blow up

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.

None yet

3 participants