You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Josh Elser (JIRA)" <ji...@apache.org> on 2015/02/03 00:00:34 UTC

[jira] [Resolved] (ACCUMULO-3555) TabletServerBatchReaderIterator doesn't maintain reference to TabletServerBatchReader

     [ https://issues.apache.org/jira/browse/ACCUMULO-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josh Elser resolved ACCUMULO-3555.
----------------------------------
    Resolution: Won't Fix

The problem isn't with the finalize method, but the misleading message that could interpreted that "something bad happened in the implementation" and not directing users that the problem is in their code.

> TabletServerBatchReaderIterator doesn't maintain reference to TabletServerBatchReader
> -------------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-3555
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3555
>             Project: Accumulo
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Blocker
>
> Had a user in IRC run into this again today upgrading a 1.4 instance to 1.6.0.
> ACCUMULO-587 introduced a {{finalize}} implementation into {{TabletServerBatchReader}} in an attempt to close the {{BatchScanner}} when the user might have forgotten to do so themselves. The problem, however, is that the {{TabletServerBatchReaderIterator}} doesn't maintain a reference to the {{TabletServerBatchReader}} (notice how it only uses it to create a new instnace of {{ScannerOptions}} using the copy constructor).
> In other words, when the {{TabletServerBatchReaderIterator}} is constructed, it has no references in the object graph to the {{TabletServerBatchReader}} it was created from. This means that if clients don't hold onto the BatchScanner instance, it's possible that it gets closed by the JVM calling {{finalize()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)