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

Allow READ COMMITTED isolation level #236

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

rafiss
Copy link
Contributor

@rafiss rafiss commented Feb 2, 2024

CockroachDB is adding support for READ COMMITTED, so it should be allowed here.

See https://www.cockroachlabs.com/docs/stable/read-committed

CockroachDB is adding support for READ COMMITTED, so it should be
allowed here.

See https://www.cockroachlabs.com/docs/stable/read-committed
@gordthompson
Copy link
Collaborator

Hi @rafiss - Can you test show transaction isolation level; on v23.2.0? (I'm stuck on v23.2.0-rc.2 until next week.) It doesn't seem to reflect the change from SERIALIZABLE to READ COMMITTED.

gord@gord-dv7:~$ ./crdb_sql.sh
#
# Welcome to the CockroachDB SQL shell.
# All statements must be terminated by a semicolon.
# To exit, type: \q.
#
# Server version: CockroachDB CCL v23.2.0-rc.2 (x86_64-pc-linux-gnu, built 2024/01/08 19:58:04, go1.21.5 X:nocoverageredesign) (same version as client)
# Cluster ID: 8d37ab91-5df7-4ef0-853e-726add540b27
#
# Enter \? for a brief introduction.
#
root@localhost:26257/defaultdb> begin;
BEGIN

Time: 1ms total (execution 1ms / network 1ms)

root@localhost:26257/defaultdb  OPEN> show transaction isolation level;
  transaction_isolation
-------------------------
  serializable
(1 row)

Time: 1ms total (execution 1ms / network 0ms)

root@localhost:26257/defaultdb  OPEN> SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET TRANSACTION

Time: 1ms total (execution 1ms / network 0ms)

root@localhost:26257/defaultdb  OPEN> show transaction isolation level;
  transaction_isolation
-------------------------
  serializable
(1 row)

Time: 1ms total (execution 1ms / network 0ms)

@rafiss
Copy link
Contributor Author

rafiss commented Feb 2, 2024

@gordthompson in v23.2, READ COMMITTED is still a preview feature, so there's one more setting to enable before your example will work. try: SET CLUSTER SETTING sql.txn.read_committed_isolation.enabled = true;

Copy link
Collaborator

@gordthompson gordthompson left a comment

Choose a reason for hiding this comment

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

lgtm

README.read_committed.md Outdated Show resolved Hide resolved
@rafiss rafiss merged commit 1cf1446 into cockroachdb:master Feb 7, 2024
11 checks passed
@rafiss rafiss deleted the allow-read-committed branch February 7, 2024 15:38
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.

2 participants