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

ASF GitHub Bot logged work on BEAM-12253:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/May/21 15:38
            Start Date: 03/May/21 15:38
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on a change in pull request #14704:
URL: https://github.com/apache/beam/pull/14704#discussion_r625174893



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java
##########
@@ -386,6 +387,8 @@ protected void finalize() throws Throwable {
             currentReader.close();
           } catch (IOException e) {
             LOG.error("Failed to close BoundedReader due to failure processing 
bundle.", e);
+          } finally {
+            currentReader = null;

Review comment:
       spotbugs seems not happy about this




-- 
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:
[email protected]


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

    Worklog Id:     (was: 592225)
    Time Spent: 1h 10m  (was: 1h)

> Read.UnboundedSourceAsSDFRestrictionTracker doesn't use cache for readers in 
> getProgress
> ----------------------------------------------------------------------------------------
>
>                 Key: BEAM-12253
>                 URL: https://issues.apache.org/jira/browse/BEAM-12253
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Sam Whittle
>            Assignee: Sam Whittle
>            Priority: P2
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java#L963
> In getProgress, if currentReader == null a new reader is constructed from the 
> restriction checkpoint.  I think that we should consult the reader cache as 
> creating readers is sometimes expensive.
> I observed in Nexmark pipelines that readers were being created at this 
> location.



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

Reply via email to