You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kh...@apache.org on 2017/03/17 20:10:43 UTC
[08/49] geode git commit: GEODE-1969: fix IOException on force flush
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/019ee40d
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/019ee40d
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/019ee40d
Branch: refs/heads/feature/GEODE-2420
Commit: 019ee40d676d65e7474581dd0bd357364094de2f
Parents: 3f2de08
Author: shankar <sh...@ampool.io>
Authored: Fri Dec 16 16:31:54 2016 +0530
Committer: Ken Howe <kh...@pivotal.io>
Committed: Fri Mar 17 13:09:44 2017 -0700
----------------------------------------------------------------------
.../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/019ee40d/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) {