这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@tirumaraiselvan
Copy link
Contributor

@tirumaraiselvan tirumaraiselvan commented Dec 3, 2019

Description

Fixes the TODO in #3191 and fixes the commented code in #3465

As RQSelect and RQCount statements could be combined with run_sql queries which mutate data, we had set the tx access mode for them to be READ WRITE to support backwards compatibility in the console.

But the console is doing lots of RQSelect alongside READ ONLY run_sql, which forces the console to continue using run_sql in READ WRITE. This would negate the performance benefit of READ ONLY run_sql in the first place.

This PR fixes that by making RQSelect and RQCount work with both types of access modes.

Affected components

  • Server

@netlify
Copy link

netlify bot commented Dec 3, 2019

Deploy preview for hasura-docs ready!

Built with commit e0cbe33

https://deploy-preview-3467--hasura-docs.netlify.com

@hasura-bot
Copy link
Contributor

Review app for commit d5eb012 deployed to Heroku: https://hge-ci-pull-3467.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3467-d5eb0123

onLeft (reconcileAccessModes expectedMode queryMode) $ \errMode ->
throw400 BadRequest $
"incompatible access mode requirements in bulk query, " <>
"expected access mode: " <>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hindent auto formatting

@tirumaraiselvan tirumaraiselvan force-pushed the read_only_select_improvements branch from 17ba975 to 107c766 Compare December 4, 2019 07:37
@hasura-bot
Copy link
Contributor

Review app for commit 107c766 deployed to Heroku: https://hge-ci-pull-3467.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3467-107c766f

@hasura-bot
Copy link
Contributor

Review app for commit e0cbe33 deployed to Heroku: https://hge-ci-pull-3467.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3467-e0cbe33c

@lexi-lambda lexi-lambda merged commit ff4b2bf into hasura:master Dec 4, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-3467.herokuapp.com is deleted

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
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