asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: Symbolic constants in lock manager
Date Mon, 28 Nov 2016 17:45:46 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 72aa1b742 -> 38644bb38


Symbolic constants in lock manager

Change-Id: I774dd40113f5fa4fee94dde72f4ec6a1891c6b6e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/694
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/38644bb3
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/38644bb3
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/38644bb3

Branch: refs/heads/master
Commit: 38644bb38b9f6f225278a5509f6a31ce13faf9bc
Parents: 72aa1b7
Author: Till Westmann <tillw@apache.org>
Authored: Wed Nov 23 10:43:52 2016 -0800
Committer: Till Westmann <tillw@apache.org>
Committed: Mon Nov 28 09:45:22 2016 -0800

----------------------------------------------------------------------
 .../management/service/locking/ConcurrentLockManager.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/38644bb3/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ConcurrentLockManager.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ConcurrentLockManager.java
b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ConcurrentLockManager.java
index faec2ed..280f8d2 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ConcurrentLockManager.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ConcurrentLockManager.java
@@ -784,8 +784,8 @@ public class ConcurrentLockManager implements ILockManager, ILifeCycleComponent
         @Override
         public void add(long request, long resource, long job) {
             long upgrader = resArenaMgr.getFirstUpgrader(resource);
-            reqArenaMgr.setNextRequest(request, -1);
-            if (upgrader == -1) {
+            reqArenaMgr.setNextRequest(request, NILL);
+            if (upgrader == NILL) {
                 resArenaMgr.setFirstUpgrader(resource, request);
             } else {
                 appendToRequestQueue(upgrader, request);
@@ -906,8 +906,8 @@ public class ConcurrentLockManager implements ILockManager, ILifeCycleComponent
     }
 
     private boolean resourceNotUsed(long resource) {
-        return resArenaMgr.getLastHolder(resource) == -1 && resArenaMgr.getFirstUpgrader(resource)
== -1
-                && resArenaMgr.getFirstWaiter(resource) == -1;
+        return resArenaMgr.getLastHolder(resource) == NILL && resArenaMgr.getFirstUpgrader(resource)
== NILL
+                && resArenaMgr.getFirstWaiter(resource) == NILL;
     }
 
     private void validateJob(ITransactionContext txnContext) throws ACIDException {


Mime
View raw message