commit | 42b6bbee35792661b2d01b06cd43a4278670779d | [log] [tgz] |
---|---|---|
author | Murtadha Hubail <mhubail@apache.org> | Tue Feb 27 23:54:06 2018 +0300 |
committer | Michael Blow <mblow@apache.org> | Tue Feb 27 15:24:49 2018 -0800 |
tree | abad88930d374eb3163670c21f86ea2fd8bb0cbf | |
parent | 45223180bd0b3b6fb6390c28532a9e737e0aedd8 [diff] |
[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 <mblow@apache.org> Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
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 static boolean isMetadataDataset(int datasetId) { - return datasetId < FIRST_AVAILABLE_USER_DATASET_ID; + return datasetId >= 0 && datasetId < FIRST_AVAILABLE_USER_DATASET_ID; } }
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 @@ @Override public boolean isMatch(int datasetId) { - return datasetId < MetadataIndexImmutableProperties.FIRST_AVAILABLE_USER_DATASET_ID && datasetId >= 0; + return MetadataIndexImmutableProperties.isMetadataDataset(datasetId); } }