Repository: asterixdb Updated Branches: refs/heads/master 58be3a8e4 -> b5d4f56ae
[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]> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/b5d4f56a Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/b5d4f56a Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/b5d4f56a Branch: refs/heads/master Commit: b5d4f56ae427351a282af4c8d740d8b91d21f80f Parents: 58be3a8 Author: Abdullah Alamoudi <[email protected]> Authored: Fri Jul 28 10:41:40 2017 -0700 Committer: abdullah alamoudi <[email protected]> Committed: Fri Jul 28 14:54:11 2017 -0700 ---------------------------------------------------------------------- .../java/org/apache/asterix/common/metadata/IMetadataLock.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/b5d4f56a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/IMetadataLock.java ---------------------------------------------------------------------- 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 @@ public interface IMetadataLock { 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;
