You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2018/02/27 23:25:11 UTC

asterixdb git commit: [NO ISSUE][STO] Fix Metadata Datasets Check

Repository: asterixdb
Updated Branches:
  refs/heads/master 45223180b -> 42b6bbee3


[NO ISSUE][STO] Fix Metadata Datasets Check

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

Details:
- Correct metadata datasets checks by including
  only datasets with ids >= 0.

Change-Id: Ie9cd10376194ee242fd3bdf9e72f364bc3782225
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2431
Reviewed-by: Michael Blow <mb...@apache.org>
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@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/42b6bbee
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/42b6bbee
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/42b6bbee

Branch: refs/heads/master
Commit: 42b6bbee35792661b2d01b06cd43a4278670779d
Parents: 4522318
Author: Murtadha Hubail <mh...@apache.org>
Authored: Tue Feb 27 23:54:06 2018 +0300
Committer: Michael Blow <mb...@apache.org>
Committed: Tue Feb 27 15:24:49 2018 -0800

----------------------------------------------------------------------
 .../asterix/common/metadata/MetadataIndexImmutableProperties.java  | 2 +-
 .../common/replication/MetadataOnlyReplicationStrategy.java        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/42b6bbee/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/MetadataIndexImmutableProperties.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/MetadataIndexImmutableProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/MetadataIndexImmutableProperties.java
index 2d6bb17..2876e11 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/MetadataIndexImmutableProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/MetadataIndexImmutableProperties.java
@@ -52,6 +52,6 @@ public class MetadataIndexImmutableProperties {
     }
 
     public static boolean isMetadataDataset(int datasetId) {
-        return datasetId < FIRST_AVAILABLE_USER_DATASET_ID;
+        return datasetId >= 0 && datasetId < FIRST_AVAILABLE_USER_DATASET_ID;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/42b6bbee/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/replication/MetadataOnlyReplicationStrategy.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/replication/MetadataOnlyReplicationStrategy.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/replication/MetadataOnlyReplicationStrategy.java
index 5733a60..2b97fe7 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/replication/MetadataOnlyReplicationStrategy.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/replication/MetadataOnlyReplicationStrategy.java
@@ -24,6 +24,6 @@ public class MetadataOnlyReplicationStrategy implements IReplicationStrategy {
 
     @Override
     public boolean isMatch(int datasetId) {
-        return datasetId < MetadataIndexImmutableProperties.FIRST_AVAILABLE_USER_DATASET_ID && datasetId >= 0;
+        return MetadataIndexImmutableProperties.isMetadataDataset(datasetId);
     }
 }