commit | 295291cd761fb28acae37310ea97aab014b645b2 | [log] [tgz] |
---|---|---|
author | Ali Alsuliman <ali.al.solaiman@gmail.com> | Thu Aug 15 12:21:25 2024 -0700 |
committer | Murtadha Hubail <mhubail@apache.org> | Fri Aug 16 09:47:10 2024 +0000 |
tree | 8b0441e04110f29d154ca2405a986fb84eedfee2 | |
parent | 69f382ec3d00466284e9f4b9fabfa3c60cbbd5fd [diff] |
[ASTERIXDB-3476][STO] Mark column index active, after required steps completed - user model changes: no - storage format changes: no - interface changes: no Details: Fixing the sequence to avoid double activation. Ext-ref: MB-62964 Change-Id: I5db3953cb0e9d6c16841a4f98ee14ad7ffe0afd0 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18659 Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com> Reviewed-by: Murtadha Hubail <mhubail@apache.org> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java index d12fbe9..d95678e 100644 --- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java +++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java
@@ -87,20 +87,17 @@ @Override public synchronized void activate() throws HyracksDataException { super.activate(); - postLoadingDiskComponents(); } @Override - protected void postLoadingDiskComponents() throws HyracksDataException { + protected void completeActivation() throws HyracksDataException { if (diskComponents.isEmpty()) { columnMetadata = columnManager.activate(); } else { IComponentMetadata componentMetadata = diskComponents.get(0).getMetadata(); columnMetadata = columnManager.activate(ColumnUtil.getColumnMetadataCopy(componentMetadata)); } - diskCacheManager.activate(columnMetadata.getNumberOfColumns(), diskComponents, diskBufferCache); - super.postLoadingDiskComponents(); } @Override
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java index e9a3abe..4f7c624 100644 --- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java +++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
@@ -200,11 +200,11 @@ throw HyracksDataException.create(ErrorCode.CANNOT_ACTIVATE_ACTIVE_INDEX); } loadDiskComponents(); - postLoadingDiskComponents(); + completeActivation(); + isActive = true; } - protected void postLoadingDiskComponents() throws HyracksDataException { - isActive = true; + protected void completeActivation() throws HyracksDataException { } private void loadDiskComponents() throws HyracksDataException {