You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Darrel Schneider (JIRA)" <ji...@apache.org> on 2016/10/06 23:19:20 UTC

[jira] [Created] (GEODE-1970) Oplog flush methods no longer need to catch ClosedChannelException

Darrel Schneider created GEODE-1970:
---------------------------------------

             Summary: Oplog flush methods no longer need to catch ClosedChannelException
                 Key: GEODE-1970
                 URL: https://issues.apache.org/jira/browse/GEODE-1970
             Project: Geode
          Issue Type: Improvement
          Components: persistence
            Reporter: Darrel Schneider


The flush methods in Oplog.java catch ClosedChannelException and say:
      // It is possible for a channel to be closed when our code does not
      // explicitly call channel.close (when we will set RAFclosed).
      // This can happen when a thread is doing an io op and is interrupted.
      // That thread will see ClosedByInterruptException but it will also
      // close the channel and then we will see ClosedChannelException.

However the channel is now implemented by UninterruptibleFileChannel and that implementation reopens the channel if it is closed do to interrupt so this code no longer needs to catch ClosedChannelException.

Note that similar code in OverflowOplog.java does still need to catch it because it does not use UninterruptibleFileChannel.



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