You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/03/05 15:45:00 UTC

[jira] [Work logged] (HIVE-24851) resources leak on exception in AvroGenericRecordReader constructor

     [ https://issues.apache.org/jira/browse/HIVE-24851?focusedWorklogId=561450&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-561450 ]

ASF GitHub Bot logged work on HIVE-24851:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Mar/21 15:44
            Start Date: 05/Mar/21 15:44
    Worklog Time Spent: 10m 
      Work Description: losipiuk opened a new pull request #2040:
URL: https://github.com/apache/hive/pull/2040


   ### What changes were proposed in this pull request?
   
   Fix reader leak in AvroGenericRecordReader
   
   ### Why are the changes needed?
   
   Without the fix resources may be slowly leaked if we hit exception path in AvroGenericRecordReader. 
   I specifically observed it in use of `AGRR` in https://github.com/trinodb/trino. Hitting problematic path resulted in leaking S3 connections.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Leaking resources may eventully result to application malfunction. That was observed in https://github.com/trinodb/trino which uses problematic class.
   
   ### How was this patch tested?
   
   Manually tested sibling change in forked class in https://github.com/trinodb/trino. It was done using a stress test which reproduced problem without change applied.
   With a change we no longer observed leaked connections.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 561450)
    Remaining Estimate: 0h
            Time Spent: 10m

> resources leak on exception in AvroGenericRecordReader constructor
> ------------------------------------------------------------------
>
>                 Key: HIVE-24851
>                 URL: https://issues.apache.org/jira/browse/HIVE-24851
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 3.1.2, 4.0.0
>            Reporter: Lukasz Osipiuk
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> AvroGenericRecordReader constructor creates an instance of FileReader but lacks proper exception handling, and reader is not closed on the failure path.
> This results in leaking of underlying resources (e.g. S3 connections).
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)