-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-48004: [C++][Parquet] Fix hang in ColumnReader benchmark #48005
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: main
Are you sure you want to change the base?
Conversation
The benchmark was instantiating the ColumnReader with less values than it would later attempt to read. The `ReadBatch` method would then return 0 prematurely and the loop would never progress.
|
@ursabot please benchmark lang=C++ |
|
Benchmark runs are scheduled for commit 2bba103. Watch https://buildkite.com/apache-arrow and https://conbench.ursa.dev for updates. A comment will be posted here when the runs are complete. |
| std::shared_ptr<Int64Reader> reader = | ||
| BuildReader(src, state.range(1), codec, schema.get()); | ||
| BuildReader(src, kNumValues, codec, schema.get()); |
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.
This is the fix: we were instantiating the ColumnReader with the read batch size (state.range(1)) instead of the total number of values (state.range(0)).
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.
Good catch!
|
Thanks for your patience. Conbench analyzed the 4 benchmarking runs that have been run so far on PR commit 2bba103. There were 80 benchmark results indicating a performance regression:
The full Conbench report has more details. |
| std::shared_ptr<Int64Reader> reader = | ||
| BuildReader(src, state.range(1), codec, schema.get()); | ||
| BuildReader(src, kNumValues, codec, schema.get()); |
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.
Good catch!
Rationale for this change
The benchmark was instantiating the
ColumnReaderwith less values than it would later attempt to read. TheReadBatchmethod would then return 0 prematurely and the loop would never progress.Are these changes tested?
Manually and by continuous benchmarking.
Are there any user-facing changes?
No.