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

Fix race detected in Parquet writer #14598

Merged
merged 4 commits into from
Dec 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cpp/src/io/parquet/page_enc.cu
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ void __device__ calculate_frag_size(frag_init_state_s* const s, int t)
}
}
}

auto const total_len = block_reduce(reduce_storage).Sum(len);
__syncthreads();
Copy link
Member

Choose a reason for hiding this comment

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

Right, I hesitated to bring this up since the CI didn't complain. Generally, a sync in-between is required when the same temp storage is used for different reductions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was worried too, but dug into the Sum code and saw that there were syncthreads inside and convinced myself it was ok :(

auto const total_len = block_reduce(reduce_storage).Sum(len);
auto const total_valid = block_reduce(reduce_storage).Sum(num_valid);

if (t == 0) {
Expand Down