From: <tho...@us...> - 2014-04-04 17:15:10
|
Revision: 8054 http://sourceforge.net/p/bigdata/code/8054 Author: thompsonbry Date: 2014-04-04 17:15:05 +0000 (Fri, 04 Apr 2014) Log Message: ----------- Replacing the version in SVN that had disabled the code path to write the cache blocks on the HALog. Modified Paths: -------------- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java =================================================================== --- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java 2014-04-04 17:06:57 UTC (rev 8053) +++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java 2014-04-04 17:15:05 UTC (rev 8054) @@ -1250,9 +1250,8 @@ throws IllegalStateException, InterruptedException, ExecutionException, IOException { -// if (quorum == null || !quorum.isHighlyAvailable() + if (quorum == null) { //|| !quorum.isHighlyAvailable() // || !quorum.getClient().isLeader(quorumToken)) { - if (quorum == null) { return; } @@ -1346,20 +1345,20 @@ private void writeCacheBlock(final WriteCache cache) throws InterruptedException, ExecutionException, IOException { - /* - * IFF HA - * - * TODO isHA should be true even if the quorum is not highly - * available since there still could be other services in the write - * pipeline (e.g., replication to an offline HAJournalServer prior - * to changing over into an HA3 quorum or off-site replication). The - * unit tests need to be updated to specify [isHighlyAvailable] for - * ALL quorum based test runs. - */ - final boolean isHA = quorum != null && quorum.isHighlyAvailable(); +// /* +// * IFF HA +// * +// * TODO isHA should be true even if the quorum is not highly +// * available since there still could be other services in the write +// * pipeline (e.g., replication to an offline HAJournalServer prior +// * to changing over into an HA3 quorum or off-site replication). The +// * unit tests need to be updated to specify [isHighlyAvailable] for +// * ALL quorum based test runs. +// */ +// final boolean isHA = quorum != null && quorum.isHighlyAvailable(); // IFF HA and this is the quorum leader. - final boolean isHALeader = isHA + final boolean isHALeader = quorum != null && quorum.getClient().isLeader(quorumToken); /* @@ -1440,14 +1439,16 @@ * then clean up the documentation here (see the commented * out version of this line below). */ - quorumMember.logWriteCacheBlock(pkg.getMessage(), pkg.getData().duplicate()); - - // ASYNC MSG RMI + NIO XFER. + quorumMember.logWriteCacheBlock(pkg.getMessage(), pkg.getData().duplicate()); + if (quorum.replicationFactor() > 1) { - remoteWriteFuture = quorumMember.replicate(null/* req */, pkg.getMessage(), - pkg.getData().duplicate()); - - counters.get().nsend++; + + // ASYNC MSG RMI + NIO XFER. + remoteWriteFuture = quorumMember.replicate(null/* req */, + pkg.getMessage(), pkg.getData().duplicate()); + + counters.get().nsend++; + } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |