From c7d407c6a6b40dcbf7503543b4b87178659a5a50 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Fri, 22 Dec 2017 18:01:38 +0300 Subject: [PATCH 1/2] Fix for IOException during report output on Lustre file system (#315) This fixes #314 --- CHANGELOG_CURRENT | 1 + pom.xml | 2 +- src/main/java/com/milaboratory/mixcr/cli/Util.java | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index e69de29bb..1fed0a7a7 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -0,0 +1 @@ +Fixes possible `IOException` during report output on Lustre file system \ No newline at end of file diff --git a/pom.xml b/pom.xml index d7c12fcd5..28d0c3e4e 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ com.milaboratory mixcr - 2.1.7 + 2.1.8-SNAPSHOT jar MiXCR diff --git a/src/main/java/com/milaboratory/mixcr/cli/Util.java b/src/main/java/com/milaboratory/mixcr/cli/Util.java index d27b788df..f0ab5d5de 100644 --- a/src/main/java/com/milaboratory/mixcr/cli/Util.java +++ b/src/main/java/com/milaboratory/mixcr/cli/Util.java @@ -62,7 +62,7 @@ static void appendAtomically(String fileName, byte[] content) { static void appendAtomically(File file, byte[] content) { try (FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE); - FileLock lock = channel.lock()) { + FileLock lock = lockIfPossible(channel)) { channel.position(channel.size()); channel.write(ByteBuffer.wrap(content)); } catch (IOException ioe) { @@ -70,6 +70,14 @@ static void appendAtomically(File file, byte[] content) { } } + static FileLock lockIfPossible(FileChannel channel) { + try { + return channel.lock(); + } catch (Exception e) { + return null; + } + } + public static void writeReport(String reportFileName, Report report) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ReportHelper helper = new ReportHelper(bos, false); From 6f778f112b750a47a25e543edf5531da3ece5168 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Fri, 22 Dec 2017 18:55:22 +0300 Subject: [PATCH 2/2] Release v2.1.8 --- CHANGELOG | 6 ++++++ CHANGELOG_CURRENT | 1 - pom.xml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8b11941e5..8461b7736 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,10 @@ +MiXCR 2.1.8 (22 Dec 2017) +======================== + +-- Fixes possible `IOException` during report output on Lustre file system + + MiXCR 2.1.7 ( 6 Dec 2017) ======================== diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index 1fed0a7a7..e69de29bb 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -1 +0,0 @@ -Fixes possible `IOException` during report output on Lustre file system \ No newline at end of file diff --git a/pom.xml b/pom.xml index 28d0c3e4e..ca006cfe6 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ com.milaboratory mixcr - 2.1.8-SNAPSHOT + 2.1.8 jar MiXCR