-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix flakiness of testConcurrentInsertsSelectingFromTheSameTable
#27904
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
base: master
Are you sure you want to change the base?
Fix flakiness of testConcurrentInsertsSelectingFromTheSameTable
#27904
Conversation
|
@chenjian2664 note that this PR relates to #27484
This is not true. |
|
@chenjian2664 could you please add reference in the description to recorded CI failures against object storage providers? |
findinpath
left a comment
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.
The flakiness is generated by testing against the local file system.
See #27484 (comment)
If the same issue would occur against an object storage, we would have a bug in the implementation.
|
@findinpath just considering the reading phrase, when the queries arrive at the connector, it is possible it reads the same version of the table right? |
yes, sure. This is an operation which reads from the same table it inserts into. In case of dealing with a non-blind append, we will be checking whether other concurrent operations that are also non-blind inserts have inserted data and if so, fail the operation: trino/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java Lines 2452 to 2455 in 7269eba
So, even if two operations are reading the same version of the table, only one of these operations will actually succeed in performing the commit successfully. |
|
@findinpath Thanks for guiding me to the place that committing the insert. trino/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java Line 2354 in b3c5bab
checkForConcurrentTransactionConflicts at all.
|
Description
The Delta Lake connector does not guarantee that queries are executed in a strict order. Queries may start concurrently, which makes count-based assertions in tests non-deterministic.
Additional context and related issues
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: