Murtadha Hubail has submitted this change and it was merged. Change subject: [NO ISSUE][STO] Correct Metadata Datasets VBC Partitions ......................................................................
[NO ISSUE][STO] Correct Metadata Datasets VBC Partitions - user model changes: no - storage format changes: no - interface changes: no Details: - Ensure metadata datasets number of VBCs is always one. Change-Id: I3217129dcf250287f6ccdf3223fad00a6b2fd66f Reviewed-on: https://asterix-gerrit.ics.uci.edu/2422 Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Contrib: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: abdullah alamoudi <bamou...@gmail.com> --- M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/MetadataIndexImmutableProperties.java 2 files changed, 11 insertions(+), 5 deletions(-) Approvals: Anon. E. Moose #1000171: abdullah alamoudi: Looks good to me, approved Jenkins: Verified; No violations found; ; Verified diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java index 9de8f73..f25e4f6 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java @@ -18,6 +18,8 @@ */ package org.apache.asterix.common.context; +import static org.apache.asterix.common.metadata.MetadataIndexImmutableProperties.METADATA_DATASETS_PARTITIONS; + import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; @@ -33,6 +35,7 @@ import org.apache.asterix.common.dataflow.DatasetLocalResource; import org.apache.asterix.common.exceptions.ACIDException; import org.apache.asterix.common.ioopcallbacks.AbstractLSMIOOperationCallback; +import org.apache.asterix.common.metadata.MetadataIndexImmutableProperties; import org.apache.asterix.common.replication.IReplicationStrategy; import org.apache.asterix.common.storage.DatasetResourceReference; import org.apache.asterix.common.storage.IIndexCheckpointManagerProvider; @@ -237,8 +240,10 @@ dsr = datasets.get(did); if (dsr == null) { DatasetInfo dsInfo = new DatasetInfo(did); + int partitions = MetadataIndexImmutableProperties.isMetadataDataset(did) ? METADATA_DATASETS_PARTITIONS + : numPartitions; DatasetVirtualBufferCaches vbcs = new DatasetVirtualBufferCaches(did, storageProperties, - memoryManager.getNumPages(did), numPartitions); + memoryManager.getNumPages(did), partitions); dsr = new DatasetResource(dsInfo, vbcs); datasets.put(did, dsr); } 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 8b4c779..2d6bb17 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 @@ -19,13 +19,14 @@ package org.apache.asterix.common.metadata; public class MetadataIndexImmutableProperties { + + public static final int FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID = 52; + public static final int FIRST_AVAILABLE_USER_DATASET_ID = 100; + public static final int METADATA_DATASETS_PARTITIONS = 1; + private final String indexName; private final int datasetId; private final long resourceId; - - // TODO(till? should we reconsider these numbers?!) - public static final int FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID = 52; - public static final int FIRST_AVAILABLE_USER_DATASET_ID = 100; public MetadataIndexImmutableProperties(String indexName, int datasetId, long resourceId) { this.indexName = indexName; -- To view, visit https://asterix-gerrit.ics.uci.edu/2422 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3217129dcf250287f6ccdf3223fad00a6b2fd66f Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Murtadha Hubail <mhub...@apache.org> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Michael Blow <mb...@apache.org> Gerrit-Reviewer: Murtadha Hubail <mhub...@apache.org> Gerrit-Reviewer: Till Westmann <ti...@apache.org> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com>