You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by cl...@apache.org on 2013/08/15 17:22:09 UTC

git commit: updated refs/heads/trunk to 8af453c

Updated Branches:
  refs/heads/trunk 328cc8292 -> 8af453cda


GIRAPH-734


Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/8af453cd
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/8af453cd
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/8af453cd

Branch: refs/heads/trunk
Commit: 8af453cdab42b5276cec2e89d83ce5c87d70a137
Parents: 328cc82
Author: Claudio Martella <cl...@apache.org>
Authored: Thu Aug 15 17:21:51 2013 +0200
Committer: Claudio Martella <cl...@apache.org>
Committed: Thu Aug 15 17:21:51 2013 +0200

----------------------------------------------------------------------
 CHANGELOG                                                    | 3 +++
 .../apache/giraph/partition/DiskBackedPartitionStore.java    | 8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/8af453cd/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index c8d20c8..f3bba6e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
 Giraph Change Log
 
 Release 1.1.0 - unreleased
+  GIRAPH-734: DiskBackedPartitionStore attempting to release a lock it doesn't own
+  (cmuchinsky via claudio)
+
   GIRAPH-739: Discrepancy among numeric constants corresponding to frequency of 
   writing in TextAggregatorWriter (korlando via claudio)
 

http://git-wip-us.apache.org/repos/asf/giraph/blob/8af453cd/giraph-core/src/main/java/org/apache/giraph/partition/DiskBackedPartitionStore.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/partition/DiskBackedPartitionStore.java b/giraph-core/src/main/java/org/apache/giraph/partition/DiskBackedPartitionStore.java
index dbfb791..87e04c1 100644
--- a/giraph-core/src/main/java/org/apache/giraph/partition/DiskBackedPartitionStore.java
+++ b/giraph-core/src/main/java/org/apache/giraph/partition/DiskBackedPartitionStore.java
@@ -728,7 +728,9 @@ public class DiskBackedPartitionStore<I extends WritableComparable,
                 "illegal state " + pState + " for partition " + id);
           }
         } finally {
-          wLock.unlock();
+          if (lock.isWriteLockedByCurrentThread()) {
+            wLock.unlock();
+          }
         }
       }
       return partition;
@@ -854,7 +856,9 @@ public class DiskBackedPartitionStore<I extends WritableComparable,
         }
         return null;
       } finally {
-        wLock.unlock();
+        if (lock.isWriteLockedByCurrentThread()) {
+          wLock.unlock();
+        }
       }
     }
   }