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

Release host buffers when Avro read schema is empty #6221

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

firestarman
Copy link
Collaborator

This fixes #6220.

Host buffers are not needed when Avro read schema is empty, so need to release them.

What's more, the host buffers are not necessary for empty read schema, so this can be an improvement. Tracked by #6219

Signed-off-by: Firestarman firestarmanllc@gmail.com

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
@@ -777,6 +777,7 @@ class GpuMultiFileCloudAvroPartitionReader(

val bufAndSize: Array[(HostMemoryBuffer, Long)] = if (readDataSchema.isEmpty) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if readDataSchema is empty, can we return the value earlier without reading out the avro data?

Copy link
Collaborator Author

@firestarman firestarman Aug 4, 2022

Choose a reason for hiding this comment

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

This is a little complicated, because it still needs to read out the data, but only the block metadata part, where contains the row number information.
Tracked by #6219

@firestarman
Copy link
Collaborator Author

build

Copy link
Collaborator

@thirtiseven thirtiseven left a comment

Choose a reason for hiding this comment

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

LGTM

@firestarman firestarman merged commit 6008322 into NVIDIA:branch-22.08 Aug 4, 2022
@firestarman firestarman deleted the fix-avro-multi branch August 4, 2022 07:38
@sameerz sameerz added the bug Something isn't working label Aug 4, 2022
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

Successfully merging this pull request may close these issues.

[BUG] Host buffer leak occurred when executing count with Avro multi-threaded reader
4 participants