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

Improve cancellation checks for CompressedRelationReader #1637

Closed
wants to merge 1 commit into from

Conversation

RobinTF
Copy link
Collaborator

@RobinTF RobinTF commented Nov 22, 2024

Improves the placement of cancellation checks slightly to avoid spamming the console with warnings.

@sparql-conformance
Copy link

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.24%. Comparing base (5f28e83) to head (246b977).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1637   +/-   ##
=======================================
  Coverage   89.24%   89.24%           
=======================================
  Files         374      374           
  Lines       35683    35685    +2     
  Branches     4027     4027           
=======================================
+ Hits        31845    31848    +3     
+ Misses       2538     2537    -1     
  Partials     1300     1300           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Nov 22, 2024

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

I am not sure whether this fixes anything, so I am leaning towards closing this PR.

auto decompressedBlockAndMetadata = decompressAndPostprocessBlock(
compressedBlock, blockMetadata.numRows_, scanConfig, blockMetadata);
cancellationHandle->throwIfCancelled();
Copy link
Member

Choose a reason for hiding this comment

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

These changes probably don't hurt, but I don't understand what they are supposed to fix.
In theory, these lead to poor performance, as the cancellationHandle is concurrently accessed by many threads, and so we have added 2 L2-Cache-misses, but probably even those are not fixable.

The issues we saw, were reported here, but the missed cancellation check was somewhere else (your meachnism doesn't report, where the cancellation checks were missing, but the first check after the missed deadline. With materialized inputs that is often in the same loop, but with lazy inputs, it might be completely somewhere else, in a different generator.
So I don't know, what the benefit of these checks is (reading one block should definitely be orders of magnituds faster than the timeout interval, so it suffices if the consumer checks the timeout.

@joka921
Copy link
Member

joka921 commented Nov 29, 2024

I still don't think that there was something wrong here. Timeout checks that appear to be in CompressedRelation.h are typically a symptom of timeout check failures in other operations when the evaluation is lazy.

@joka921 joka921 closed this Nov 29, 2024
@RobinTF RobinTF deleted the check-timeout-more-often branch December 3, 2024 17:48
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.

2 participants