-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix potentially incorrect table read version for writes on Delta Lake #21330
Fix potentially incorrect table read version for writes on Delta Lake #21330
Conversation
42f46bb
to
9b75b58
Compare
/test-with-secrets sha=9b75b58eb3ff26c91f98196be90aece77c33c617 |
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/8506204061 |
...lta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeLocalConcurrentWritesTest.java
Show resolved
Hide resolved
...lta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeLocalConcurrentWritesTest.java
Show resolved
Hide resolved
9b75b58
to
14cfb6d
Compare
@ebyhr pls trigger a new build with secrets |
/test-with-secrets sha=14cfb6df6e2e1d2ce7f3655ed30db7fe801c391c |
The CI workflow run with tests that require additional secrets has been started: https://github.com/trinodb/trino/actions/runs/8518514728 |
From the build https://github.com/trinodb/trino/actions/runs/8518514728/job/23330834685 , I see that the delta-lake cloud-tests finished successfully. |
table.getMetadataEntry(), | ||
table.getProtocolEntry(), | ||
inputColumns, | ||
getMandatoryCurrentVersion(fileSystem, tableLocation, table.getReadVersion()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, this line was incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A question about tests.
...lta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeLocalConcurrentWritesTest.java
Show resolved
Hide resolved
In the context of concurrent operations, it may potentially happen that between the time when the version of table has been initially read for scanning and the time when the planning of the write operation begins that a new version of the table is current. Nevertheless, use in performing the write operations the version of the table initially read as reference for beginning the operation to ensure the consistency of the operation. This strategy helps in unintentionally skipping the processing of transaction log information corresponding to other concurrent operations.
Without the fix in the previous commit, in the concurrency tests for the non-blind INSERT operations it happened sometime that the source table handles processed in `finishInsert` operation were wrongly skipped because they were considered time travel references of the target table which led to the situation in which the INSERT operation was inaccurately considered blind.
14cfb6d
to
1941f3f
Compare
Description
In the context of concurrent operations, it may potentially happen that between the time when the version of table has been initially read for scanning and the time when the planning of the write operation begins that a new version of the table is current. Nevertheless, use in performing the write operations the version of the table initially read as reference for beginning the operation to ensure the consistency of the operation.
This strategy helps in unintentionally skipping the processing of transaction log information corresponding to other concurrent operations.
Additional context and related issues
Fixes #21324
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: