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

[Feature] Transaction isolation that supports the Serializable isolation level #4616

Open
2 tasks done
Zouxxyy opened this issue Dec 2, 2024 · 0 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@Zouxxyy
Copy link
Contributor

Zouxxyy commented Dec 2, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Currently, the transaction isolation level of paimon is snapshot level. For the following concurrent modification scenarios, incorrect data may occur

sql("create table t1 (id int, c1 string, c2 string) using paimon tblproperties('primary-key'='id')")

sql("insert into t1 values (1, 'a', 'a')")

val update1 = Future {
  sql("update t1 set c1 = 'b' where id = 1")
}

val update2 = Future {
  sql("update t1 set c2 = 'c' where id = 1")
}
Await.result(update1, 1000.seconds)
Await.result(update2, 1000.seconds)

sql("select * from t1").show()

The output result may be any of 1, 'b', 'a' 1, 'a', 'c' or 1, 'b', 'c'

Solution

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@Zouxxyy Zouxxyy added the enhancement New feature or request label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant