-
Notifications
You must be signed in to change notification settings - Fork 3k
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 concurrent writes reconciliation for UPDATE/MERGE/DELETE in Delta Lake #21727
Merged
ebyhr
merged 4 commits into
trinodb:master
from
findinpath:findinpath/delta-concurrent-update-merge-delete-reconciliation-follow-up
Jun 5, 2024
Merged
Add concurrent writes reconciliation for UPDATE/MERGE/DELETE in Delta Lake #21727
ebyhr
merged 4 commits into
trinodb:master
from
findinpath:findinpath/delta-concurrent-update-merge-delete-reconciliation-follow-up
Jun 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
findinpath
force-pushed
the
findinpath/delta-concurrent-update-merge-delete-reconciliation-follow-up
branch
from
May 13, 2024 20:24
10b2d55
to
1c8674b
Compare
ebyhr
force-pushed
the
findinpath/delta-concurrent-update-merge-delete-reconciliation-follow-up
branch
from
May 13, 2024 22:07
1c8674b
to
edcb69c
Compare
findinpath
force-pushed
the
findinpath/delta-concurrent-update-merge-delete-reconciliation-follow-up
branch
2 times, most recently
from
May 14, 2024 06:18
0c968e0
to
e577846
Compare
pajaks
reviewed
May 17, 2024
...lta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeLocalConcurrentWritesTest.java
Outdated
Show resolved
Hide resolved
...lta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeLocalConcurrentWritesTest.java
Outdated
Show resolved
Hide resolved
findinpath
force-pushed
the
findinpath/delta-concurrent-update-merge-delete-reconciliation-follow-up
branch
from
May 28, 2024 20:37
cfc7ebc
to
72dc45a
Compare
pajaks
approved these changes
May 29, 2024
/test-with-secrets sha=04d7fde3bbb30b242b07acbbba1a00b0f04dd3ee |
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/9294322023 |
ebyhr
approved these changes
Jun 3, 2024
core/trino-main/src/main/java/io/trino/sql/planner/QueryPlanner.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/TableWriterNode.java
Outdated
Show resolved
Hide resolved
Add the possibility to perform analysis on the dependencies of the statement using the merge mechanism. Specifically one connector could potentially figure out whether concurrent UPDATE/DELETE/MERGE operations which add data into the same table as the one from which data is being selected collide with each other.
… Lake Allow committing operations based on the merge mechanism in a concurrent context by placing these operations right after any other previously concurrently completed write operations. Disallow committing the operation in any of the following cases: - table schema change has been committed in the meantime - table protocol change has been committed in the meantime - add files committed in the meantime should be read by the current operation - remove files committed in the meantime conflict with the add files read by the current operation The current changes also take into consideration the `delta.isolationLevel` table property of the Delta Lake table for UPDATE/DELETE/MERGE operations. Relevant example taken from Databricks documentation in regards to the distinction between `WriteSerializable` and `Serializable` isolation levels: > For example, consider `txn1`, a long running delete and `txn2`, > which inserts blindly data into the table. > `txn2` and `txn1` complete and they are recorded in the order > `txn2, txn1` > into the history of the table. > According to the history, the data inserted in `txn2` should not exist > in the table. For `Serializable` level, a reader would never see data > inserted by `txn2`. However, for the `WriteSerializable` level, a reader > could at some point see the data inserted by `txn2`. A few words about WriteSerializable isolation level taken from delta.io javadocs: > This isolation level will ensure snapshot isolation consistency guarantee > between write operations only. > In other words, if only the write operations are considered, then > there exists a serializable sequence between them that would produce the same > result as seen in the table.
findinpath
force-pushed
the
findinpath/delta-concurrent-update-merge-delete-reconciliation-follow-up
branch
from
June 3, 2024 14:01
04d7fde
to
e3fc210
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Spin-off from #18521
Allow committing operations based on:
in a concurrent context by placing these operations right after
any other previously concurrently completed write operations.
Disallow committing the operation in any of the following cases:
the current operation
add files read by the current operation
The current changes also take into consideration the
delta.isolationLevel
table property of the Delta Lake table for UPDATE/DELETE/MERGE operations.
Relevant example taken from Databricks documentation in regards to the
distinction between
WriteSerializable
andSerializable
isolation levels:A few words about WriteSerializable isolation level taken from delta.io javadocs:
Additional context and related issues
INSERT scaffolding PRs:
INSERT
in Delta Lake #18506Spin-off from #18521
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: