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 <[email protected]>
Tested-by: Jenkins <[email protected]>
BAD: Jenkins <[email protected]>
Reviewed-by: Till Westmann <[email protected]>
Integration-Tests: Jenkins <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>

Reply via email to