[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 {