Repository: activemq-artemis Updated Branches: refs/heads/master 10187d003 -> d505f5cc3
ARTEMIS-831 avoid shutting down the server after interrupted threads on divert (copy and rename) probably introduced at ARTEMIS-322 Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b4924ce7 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b4924ce7 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b4924ce7 Branch: refs/heads/master Commit: b4924ce73b8d92ac9a6ae3faaabdefc5844a4a64 Parents: 10187d0 Author: Ravi Soni <[email protected]> Authored: Thu Oct 27 21:47:35 2016 -0400 Committer: Clebert Suconic <[email protected]> Committed: Fri Oct 28 16:28:57 2016 -0400 ---------------------------------------------------------------------- .../apache/activemq/artemis/core/io/AbstractSequentialFile.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b4924ce7/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java ---------------------------------------------------------------------- diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java index 5665e57..0c6dcdf 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java @@ -19,6 +19,7 @@ package org.apache.activemq.artemis.core.io; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; +import java.nio.channels.ClosedChannelException; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; @@ -117,6 +118,8 @@ public abstract class AbstractSequentialFile implements SequentialFile { FileIOUtil.copyData(this, newFileName, buffer); newFileName.close(); this.close(); + } catch (ClosedChannelException e) { + throw e; } catch (IOException e) { factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; @@ -140,6 +143,8 @@ public abstract class AbstractSequentialFile implements SequentialFile { public final void renameTo(final String newFileName) throws IOException, InterruptedException, ActiveMQException { try { close(); + } catch (ClosedChannelException e) { + throw e; } catch (IOException e) { factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e;
