accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1455268 - in /accumulo/branches/1.4.3: ./ src/ src/core/ src/server/ src/server/src/ src/server/src/main/java/org/apache/accumulo/server/tabletserver/ src/server/src/main/java/org/apache/accumulo/server/test/functional/ src/server/src/main...
Date Mon, 11 Mar 2013 18:09:06 GMT
Author: kturner
Date: Mon Mar 11 18:09:06 2013
New Revision: 1455268

URL: http://svn.apache.org/r1455268
Log:
ACCUMULO-1170 fixed race condition

Modified:
    accumulo/branches/1.4.3/   (props changed)
    accumulo/branches/1.4.3/src/   (props changed)
    accumulo/branches/1.4.3/src/core/   (props changed)
    accumulo/branches/1.4.3/src/server/   (props changed)
    accumulo/branches/1.4.3/src/server/src/   (props changed)
    accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
    accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/test/functional/
  (props changed)
    accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
  (props changed)

Propchange: accumulo/branches/1.4.3/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4:r1455252

Propchange: accumulo/branches/1.4.3/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1455252

Propchange: accumulo/branches/1.4.3/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/core:r1455252

Propchange: accumulo/branches/1.4.3/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/server:r1455252

Propchange: accumulo/branches/1.4.3/src/server/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/server/src:r1455252

Modified: accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java?rev=1455268&r1=1455267&r2=1455268&view=diff
==============================================================================
--- accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
(original)
+++ accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
Mon Mar 11 18:09:06 2013
@@ -268,8 +268,6 @@ public class InMemoryMap {
    * 
    */
   public void mutate(List<Mutation> mutations) {
-    int mc = nextMutationCount.getAndAdd(mutations.size());
-    int numKVs = 0;
     // Can not update mutationCount while writes that started before
     // are in progress, this would cause partial mutations to be seen.
     // Also, can not continue until mutation count is updated, because
@@ -277,7 +275,8 @@ public class InMemoryMap {
     // wait for writes that started before to finish.
     //
     // using separate lock from this map, to allow read/write in parallel
-    synchronized (writeSerializer ) {
+    synchronized (writeSerializer) {
+      int mc = nextMutationCount.getAndAdd(mutations.size());
       try {
         map.mutate(mutations, mc);
       } finally {

Propchange: accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/test/functional/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional:r1455252

Propchange: accumulo/branches/1.4.3/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java:r1455252



Mime
View raw message