[Feature] Transaction isolation that supports the Serializable isolation level
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 396
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/paimon/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
```scala
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!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the concurrent SQL example in the issue and trace Paimon's transaction-isolation implementation; no files, entry points, or tests are named. Done would mean a defined Serializable isolation level prevents the conflicting outcomes shown, with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala, sql
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100