asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [ASTERIXDB-2006][TX] Fix metadata lock containment rules
Date Fri, 28 Jul 2017 21:54:12 GMT
abdullah alamoudi has submitted this change and it was merged.

Change subject: [ASTERIXDB-2006][TX] Fix metadata lock containment rules
......................................................................


[ASTERIXDB-2006][TX] Fix metadata lock containment rules

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Locks with mode exclusive modify cover all modify modes

Change-Id: Ib0ecbaed86370707d560b7d0c3e6933c198aab41
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1907
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
---
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/IMetadataLock.java
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; No violations found; No violations found; Verified



diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/IMetadataLock.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/IMetadataLock.java
index ba17b0c..ebae47e 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/IMetadataLock.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/IMetadataLock.java
@@ -39,7 +39,10 @@
             if (mode == this) {
                 return true;
             }
-            if (this == Mode.WRITE) {
+            if (this == Mode.WRITE || this == Mode.UPGRADED_WRITE) {
+                return true;
+            }
+            if (this == Mode.EXCLUSIVE_MODIFY && (mode == Mode.MODIFY || mode ==
Mode.INDEX_BUILD)) {
                 return true;
             }
             return mode == Mode.READ;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1907
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0ecbaed86370707d560b7d0c3e6933c198aab41
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Murtadha Hubail <mhubail@apache.org>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message