abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1907

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
---
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/IMetadataLock.java
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/07/1907/1

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: newchange
Gerrit-Change-Id: Ib0ecbaed86370707d560b7d0c3e6933c198aab41
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamou...@gmail.com>

Reply via email to