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

String sqllogictest error when running the test with complete #12752

Closed
Tracked by #13504
jayzhan211 opened this issue Oct 4, 2024 · 10 comments
Closed
Tracked by #13504

String sqllogictest error when running the test with complete #12752

jayzhan211 opened this issue Oct 4, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@jayzhan211
Copy link
Contributor

Describe the bug

There is error when running stl test with complete

Execution error: Error completing "string/string_view.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part
Execution error: Error completing "string/large_string.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part
Execution error: Error completing "string/dictionary_utf8.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part
Error: Execution("3 failures")

To Reproduce

Run cargo test --test sqllogictests -- --complete

Expected behavior

Smoothly complete the test

Additional context

No response

@jayzhan211 jayzhan211 added the bug Something isn't working label Oct 4, 2024
@jayzhan211 jayzhan211 changed the title String sqllogictest error when running with complete String sqllogictest error when running the test with complete Oct 4, 2024
@leonzchang
Copy link

Related to #12618

@findepi
Copy link
Member

findepi commented Oct 28, 2024

A workaround is to --complete only individual tests, which is obviously cumbersome.

@Omega359
Copy link
Contributor

I believe this ticket can be closed with the fix in #13142. I didn't encounter this with the sqlite tests. @jayzhan211

@berkaysynnada
Copy link
Contributor

cargo test --test sqllogictests -- --complete is still generating the same error

@Omega359
Copy link
Contributor

Ah, yes, my mistake. it's the include of string_query.slt.part that seems to be causing the issues.

@logan-keede
Copy link
Contributor

logan-keede commented Jan 23, 2025

Update:- it is 4 failures as of commit 44cf77f (DF44)

Completed in 8 seconds                                                                                                                                                             \
Execution error: Error completing "join.slt": failed to rename file from test_files/join.slt.temp to test_files/join.slt: No such file or directory (os error 2)
Execution error: Error completing "string/string.slt": failed to rename file from test_files/string/init_data.slt.part.temp to test_files/string/./init_data.slt.part: No such file or directory (os error 2)
Execution error: Error completing "string/string_view.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part: No such file or directory (os error 2)
Execution error: Error completing "string/dictionary_utf8.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part: No such file or directory (os error 2)
Error: Execution("4 failures")
error: test failed, to rerun pass `-p datafusion-sqllogictest --test sqllogictests`

Analysis

  1. Error completing "join.slt" seems to be stemming fro the fact that datafusion/sqllogictest/test_files/join_disable_repartition_joins.slt seems to be including it but it is not a part file so it fails to do so.
  2. rest of them occur because sqllogictest run these tests asynchronously and multiple files try to include string_query.slt.part and init_data.slt.part which result in them renaming them to clashing names and then one of them delete a temp file while other tries to find it. (I just checked it runs perfectly on one thread but takes a whole minute)

Possible solution

  1. rename join.slt to join.slt.part
  2. we can just leave it as is and run the in 1 thread when really needed
  3. or separate files that need to be run in synchronous manner
  4. or allow redundant code and eliminate include statement
  5. or merge them into one file somehow

cc @jayzhan211 @Omega359 @berkaysynnada

@logan-keede
Copy link
Contributor

logan-keede commented Jan 23, 2025

take
PS: it does not seem like I am getting auto-assigned.

@Omega359
Copy link
Contributor

My first though was to just fix sqllogictest-rs to include a random part in the .temp name such that multiple threads would each have their own copy of the included file.

@logan-keede
Copy link
Contributor

My first though was to just fix sqllogictest-rs to include a random part in the .temp name such that multiple threads would each have their own copy of the included file.

That should work, I will look into that approach.

@alamb
Copy link
Contributor

alamb commented Jan 30, 2025

@logan-keede fixed this upstream last week: risinglightdb/sqllogictest-rs#249

@alamb alamb closed this as completed Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants