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

Selectively reduce multithreaded parsing @error #1099

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

Liozou
Copy link
Contributor

@Liozou Liozou commented Jun 17, 2023

Reduce the @error introduced in #1073 to a @warning whenever previous warnings may explain why multithreaded parsing failed (typically, unequal number of columns per row). In those cases, it will print:

┌ Warning: Multithreaded parsing failed and fell back to single-threaded parsing, check previous warnings for possible reasons.

If there is no possible explanation, this still shows a red @error saying:

┌ Error: Multithreaded parsing failed and fell back to single-threaded parsing. This can happen if the input contains multi-line fields; otherwise, please report this issue.

In both cases, a debug statement is printed as soon as multithread parsing failed (if the Context debug kwarg is set), whereas the @warning or @error only appears at the end of the fallback single-threaded parsing.

I think this compromise allows us to still get error reports like #1095, which are crucial to detect and allow use to fix underlying issues where multithreaded parsing should not fail (like #1098 in this instance), while avoiding to stress the user with an @error when there is nothing to report.

Close #1095.

@codecov
Copy link

codecov bot commented Jun 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (07fb6c2) 90.40% compared to head (5093e6b) 90.42%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1099      +/-   ##
==========================================
+ Coverage   90.40%   90.42%   +0.01%     
==========================================
  Files           9        9              
  Lines        2294     2298       +4     
==========================================
+ Hits         2074     2078       +4     
  Misses        220      220              
Impacted Files Coverage Δ
src/context.jl 88.99% <100.00%> (ø)
src/file.jl 94.46% <100.00%> (+0.03%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@quinnj quinnj merged commit 4e6a332 into JuliaData:main Jun 20, 2023
@Liozou Liozou deleted the warningmultithreadedfailure branch July 27, 2023 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multithreaded parsing error should be warning
2 participants