You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2017/03/10 19:38:27 UTC
geode git commit: GEODE-1969: fix IOException on force flush
Repository: geode
Updated Branches:
refs/heads/develop d7e7885c6 -> e24c466dd
GEODE-1969: fix IOException on force flush
An oplog closed while writing to oplog with gemfire.syncWrites=true
whill no longer cause the force flush to fail with an
IOException.
The channel force call is now done inside the sync block
which makes sure that the write is flushed before another
thread can close the channel.
This closes #320
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/e24c466d
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/e24c466d
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/e24c466d
Branch: refs/heads/develop
Commit: e24c466dda3072b1edfdd0091e28b75a9f64bd4a
Parents: d7e7885
Author: shankar <sh...@ampool.io>
Authored: Fri Dec 16 16:31:54 2016 +0530
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Fri Mar 10 11:38:16 2017 -0800
----------------------------------------------------------------------
.../main/java/org/apache/geode/internal/cache/Oplog.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/e24c466d/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
index 8b0bba5..27f41a2 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
@@ -5275,11 +5275,11 @@ public final class Oplog implements CompactableOplog, Flushable {
olf.bytesFlushed += flushed;
bb.clear();
}
- }
- if (doSync) {
- if (SYNC_WRITES) {
- // Synch Meta Data as well as content
- olf.channel.force(true);
+ if (doSync) {
+ if (SYNC_WRITES) {
+ // Synch Meta Data as well as content
+ olf.channel.force(true);
+ }
}
}
} catch (ClosedChannelException ignore) {