diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/CancellationTestExecutor.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/CancellationTestExecutor.java
index 41aa23f..a1e70dc 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/CancellationTestExecutor.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/CancellationTestExecutor.java
@@ -63,11 +63,16 @@
             }
         };
         Future<InputStream> future = executor.submit(query);
-        if (cancellable) {
-            Thread.sleep(20);
-            // Cancels the query request while the query is executing.
-            int rc = cancelQuery(getEndpoint(Servlets.RUNNING_REQUESTS), newParams);
-            Assert.assertTrue(rc == 200 || rc == 404);
+        while (!future.isDone()) {
+            if (cancellable) {
+                Thread.sleep(10);
+                // Cancels the query request while the query is executing.
+                int rc = cancelQuery(getEndpoint(Servlets.RUNNING_REQUESTS), newParams);
+                Assert.assertTrue(rc == 200 || rc == 404);
+                if (rc == 200) {
+                    break;
+                }
+            }
         }
         InputStream inputStream = future.get();
         // Since the current cancellation (i.e., abort) implementation is based on thread.interrupt and we did not
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
index 5a9852e..58a2413 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
@@ -35,7 +35,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleReference;
 import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
@@ -138,7 +138,7 @@
 
     public void close() throws HyracksDataException {
         Throwable failure = ResourceReleaseUtils.close(fileIndexSearchCursor, null);
-        failure = DestroyUtils.destroy(failure, fileIndexSearchCursor, fileIndexAccessor);
+        failure = CleanupUtils.destroy(failure, fileIndexSearchCursor, fileIndexAccessor);
         failure = ResourceReleaseUtils.close(indexDataflowHelper, failure);
         if (failure != null) {
             throw HyracksDataException.create(failure);
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
index 2314f88..4f90985 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
@@ -20,6 +20,7 @@
 
 import java.nio.ByteBuffer;
 
+import org.apache.commons.lang3.mutable.MutableBoolean;
 import org.apache.hyracks.algebricks.data.IBinaryIntegerInspector;
 import org.apache.hyracks.algebricks.data.IBinaryIntegerInspectorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -34,6 +35,7 @@
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
@@ -102,6 +104,7 @@
             final FrameTupleReference tRef = new FrameTupleReference();;
             final IBinaryIntegerInspector intInsepctor = intInsepctorFactory.createBinaryIntegerInspector(ctx);
             final IScalarEvaluator eval = brachingExprEvalFactory.createScalarEvaluator(ctx);
+            final MutableBoolean hasFailed = new MutableBoolean(false);
             for (int i = 0; i < numberOfNonMaterializedOutputs; i++) {
                 appenders[i] = new FrameTupleAppender(new VSizeFrame(ctx), true);
             }
@@ -160,28 +163,44 @@
 
                 @Override
                 public void close() throws HyracksDataException {
-                    HyracksDataException hde = null;
-                    for (int i = 0; i < numberOfNonMaterializedOutputs; i++) {
-                        if (isOpen[i]) {
-                            try {
-                                appenders[i].write(writers[i], true);
-                                writers[i].close();
-                            } catch (Throwable th) {
-                                if (hde == null) {
-                                    hde = HyracksDataException.create(th);
-                                } else {
-                                    hde.addSuppressed(th);
+                    Throwable hde = null;
+                    // write if hasn't failed
+                    if (!hasFailed.booleanValue()) {
+                        for (int i = 0; i < numberOfNonMaterializedOutputs; i++) {
+                            if (isOpen[i]) {
+                                try {
+                                    appenders[i].write(writers[i], true);
+                                } catch (Throwable th) {
+                                    hde = th;
+                                    break;
                                 }
                             }
                         }
                     }
+
+                    // fail the writers
                     if (hde != null) {
-                        throw hde;
+                        for (int i = 0; i < numberOfNonMaterializedOutputs; i++) {
+                            if (isOpen[i]) {
+                                CleanupUtils.fail(writers[i], hde);
+                            }
+                        }
+                    }
+
+                    // close
+                    for (int i = 0; i < numberOfNonMaterializedOutputs; i++) {
+                        if (isOpen[i]) {
+                            hde = CleanupUtils.close(writers[i], hde);
+                        }
+                    }
+                    if (hde != null) {
+                        throw HyracksDataException.create(hde);
                     }
                 }
 
                 @Override
                 public void fail() throws HyracksDataException {
+                    hasFailed.setTrue();
                     HyracksDataException hde = null;
                     for (int i = 0; i < numberOfNonMaterializedOutputs; i++) {
                         if (isOpen[i]) {
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/CleanupUtils.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/CleanupUtils.java
new file mode 100644
index 0000000..a67c133
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/CleanupUtils.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hyracks.api.util;
+
+import org.apache.hyracks.api.comm.IFrameWriter;
+import org.apache.hyracks.api.dataflow.IDestroyable;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+public class CleanupUtils {
+
+    private static final Logger LOGGER = LogManager.getLogger();
+
+    private CleanupUtils() {
+    }
+
+    public static Throwable destroy(Throwable root, IDestroyable... destroyables) {
+        for (int i = 0; i < destroyables.length; i++) {
+            if (destroyables[i] != null) {
+                IDestroyable destroyable = destroyables[i];
+                if (destroyable != null) {
+                    try {
+                        destroyable.destroy();
+                    } catch (Throwable th) { // NOSONAR. Had to be done to satisfy contracts
+                        try {
+                            LOGGER.log(Level.WARN, "Failure destroying a destroyable resource", th);
+                        } catch (Throwable ignore) {
+                            // Do nothing
+                        }
+                        root = ExceptionUtils.suppress(root, th);
+                    }
+                }
+            }
+        }
+        return root;
+    }
+
+    /**
+     * Close the IFrameWriter and suppress any Throwable thrown by the close call.
+     * This method must NEVER throw any Throwable
+     *
+     * @param writer
+     *            the writer to close
+     * @param root
+     *            the first exception encountered during release of resources
+     * @return the root Throwable if not null or a new Throwable if any was thrown, otherwise, it returns null
+     */
+    public static Throwable close(IFrameWriter writer, Throwable root) {
+        if (writer != null) {
+            try {
+                writer.close();
+            } catch (Throwable th) { // NOSONAR Will be re-thrown
+                try {
+                    LOGGER.log(Level.WARN, "Failure closing a closeable resource", th);
+                } catch (Throwable loggingFailure) {
+                    // Do nothing
+                }
+                root = ExceptionUtils.suppress(root, th);
+            }
+        }
+        return root;
+    }
+
+    /**
+     * Fail the IFrameWriter and suppress any Throwable thrown by the fail call.
+     * This method must NEVER throw any Throwable
+     *
+     * @param writer
+     *            the writer to fail
+     * @param root
+     *            the root failure
+     */
+    public static void fail(IFrameWriter writer, Throwable root) {
+        try {
+            writer.fail();
+        } catch (Throwable th) { // NOSONAR Will be re-thrown
+            try {
+                LOGGER.log(Level.WARN, "Failure failing " + writer.getClass().getSimpleName(), th);
+            } catch (Throwable loggingFailure) {
+                // Do nothing
+            }
+            root.addSuppressed(th);
+        }
+    }
+}
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/DestroyUtils.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/DestroyUtils.java
deleted file mode 100644
index 97c284d..0000000
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/DestroyUtils.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.hyracks.api.util;
-
-import org.apache.hyracks.api.dataflow.IDestroyable;
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-public class DestroyUtils {
-
-    private static final Logger LOGGER = LogManager.getLogger();
-
-    private DestroyUtils() {
-    }
-
-    public static Throwable destroy(Throwable root, IDestroyable... destroyables) {
-        for (int i = 0; i < destroyables.length; i++) {
-            if (destroyables[i] != null) {
-                IDestroyable destroyable = destroyables[i];
-                if (destroyable != null) {
-                    try {
-                        destroyable.destroy();
-                    } catch (Throwable th) { // NOSONAR. Had to be done to satisfy contracts
-                        try {
-                            LOGGER.log(Level.WARN, "Failure destroying a destroyable resource", th);
-                        } catch (Throwable ignore) {
-                            // Do nothing
-                        }
-                        root = ExceptionUtils.suppress(root, th);
-                    }
-                }
-            }
-        }
-        return root;
-    }
-}
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/BTreeOpContext.java b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/BTreeOpContext.java
index 60fa145..96370fe 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/BTreeOpContext.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/BTreeOpContext.java
@@ -24,7 +24,7 @@
 
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleReference;
 import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
@@ -392,7 +392,7 @@
             return;
         }
         destroyed = true;
-        Throwable failure = DestroyUtils.destroy(null, accessor, cursor);
+        Throwable failure = CleanupUtils.destroy(null, accessor, cursor);
         if (failure != null) {
             throw HyracksDataException.create(failure);
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java
index f562379..ab9359f 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java
@@ -29,7 +29,7 @@
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.job.profiling.IOperatorStats;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.api.util.ExceptionUtils;
 import org.apache.hyracks.control.common.job.profiling.OperatorStats;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -252,7 +252,7 @@
     @Override
     public void close() throws HyracksDataException {
         Throwable failure = releaseResources();
-        failure = ResourceReleaseUtils.close(writer, failure);
+        failure = CleanupUtils.close(writer, failure);
         if (failure != null) {
             throw HyracksDataException.create(failure);
         }
@@ -281,7 +281,7 @@
                 }
             }
             failure = ResourceReleaseUtils.close(cursor, failure);
-            failure = DestroyUtils.destroy(failure, cursor, indexAccessor);
+            failure = CleanupUtils.destroy(failure, cursor, indexAccessor);
             failure = ResourceReleaseUtils.close(indexHelper, failure);
         }
         return failure;
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorNodePushable.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorNodePushable.java
index 90b50c6..d5ea8bc 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorNodePushable.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorNodePushable.java
@@ -24,6 +24,7 @@
 import org.apache.hyracks.api.comm.VSizeFrame;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.api.util.ExceptionUtils;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
 import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
@@ -39,7 +40,6 @@
 import org.apache.hyracks.storage.am.common.impls.IndexAccessParameters;
 import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallback;
 import org.apache.hyracks.storage.am.common.impls.TreeIndexDiskOrderScanCursor;
-import org.apache.hyracks.storage.am.common.util.ResourceReleaseUtils;
 import org.apache.hyracks.storage.common.IIndexAccessParameters;
 import org.apache.hyracks.storage.common.ISearchOperationCallback;
 import org.apache.hyracks.storage.common.LocalResource;
@@ -74,7 +74,7 @@
                 failure = ExceptionUtils.suppress(failure, failFailure);
             }
         } finally {
-            failure = ResourceReleaseUtils.close(writer, failure);
+            failure = CleanupUtils.close(writer, failure);
         }
         if (failure != null) {
             throw HyracksDataException.create(failure);
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/util/ResourceReleaseUtils.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/util/ResourceReleaseUtils.java
index 50b6e59..b597b60 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/util/ResourceReleaseUtils.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/util/ResourceReleaseUtils.java
@@ -20,7 +20,6 @@
 
 import java.util.List;
 
-import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.util.ExceptionUtils;
 import org.apache.hyracks.storage.am.common.api.IIndexDataflowHelper;
 import org.apache.hyracks.storage.common.IIndexCursor;
@@ -129,30 +128,4 @@
         }
         return root;
     }
-
-    /**
-     * Close the IFrameWriter and suppress any Throwable thrown by the close call.
-     * This method must NEVER throw any Throwable
-     *
-     * @param writer
-     *            the writer to close
-     * @param root
-     *            the first exception encountered during release of resources
-     * @return the root Throwable if not null or a new Throwable if any was thrown, otherwise, it returns null
-     */
-    public static Throwable close(IFrameWriter writer, Throwable root) {
-        if (writer != null) {
-            try {
-                writer.close();
-            } catch (Throwable th) { // NOSONAR Will be re-thrown
-                try {
-                    LOGGER.log(Level.WARN, "Failure closing a closeable resource", th);
-                } catch (Throwable loggingFailure) {
-                    // Do nothing
-                }
-                root = ExceptionUtils.suppress(root, th);
-            }
-        }
-        return root;
-    }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeDiskComponentScanCursor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeDiskComponentScanCursor.java
index dacd41f..a120296 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeDiskComponentScanCursor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeDiskComponentScanCursor.java
@@ -20,7 +20,7 @@
 package org.apache.hyracks.storage.am.lsm.btree.impls;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.api.util.ExceptionUtils;
 import org.apache.hyracks.data.std.api.IValueReference;
 import org.apache.hyracks.data.std.primitive.BooleanPointable;
@@ -178,7 +178,7 @@
         Throwable failure = null;
         if (lsmHarness != null) {
             if (rangeCursors != null) {
-                failure = DestroyUtils.destroy(failure, rangeCursors);
+                failure = CleanupUtils.destroy(failure, rangeCursors);
                 rangeCursors = null;
             }
             try {
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeOpContext.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeOpContext.java
index 7795075..7969ba3 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeOpContext.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeOpContext.java
@@ -23,7 +23,7 @@
 
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.storage.am.btree.api.IBTreeLeafFrame;
 import org.apache.hyracks.storage.am.btree.impls.BTree;
 import org.apache.hyracks.storage.am.btree.impls.BTreeOpContext;
@@ -186,9 +186,9 @@
             return;
         }
         destroyed = true;
-        Throwable failure = DestroyUtils.destroy(null, mutableBTreeAccessors);
-        failure = DestroyUtils.destroy(failure, mutableBTreeOpCtxs);
-        failure = DestroyUtils.destroy(failure, insertSearchCursor, memCursor);
+        Throwable failure = CleanupUtils.destroy(null, mutableBTreeAccessors);
+        failure = CleanupUtils.destroy(failure, mutableBTreeOpCtxs);
+        failure = CleanupUtils.destroy(failure, insertSearchCursor, memCursor);
         if (failure != null) {
             throw HyracksDataException.create(failure);
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeRangeSearchCursor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeRangeSearchCursor.java
index d8feab1..0cb7d1c 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeRangeSearchCursor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree/src/main/java/org/apache/hyracks/storage/am/lsm/btree/impls/LSMBTreeRangeSearchCursor.java
@@ -23,7 +23,7 @@
 import java.util.PriorityQueue;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleReference;
 import org.apache.hyracks.dataflow.common.utils.TupleUtils;
@@ -341,8 +341,8 @@
             btreeAccessors = new BTreeAccessor[numBTrees];
         } else if (rangeCursors.length != numBTrees) {
             // should destroy first
-            Throwable failure = DestroyUtils.destroy(null, btreeAccessors);
-            failure = DestroyUtils.destroy(failure, rangeCursors);
+            Throwable failure = CleanupUtils.destroy(null, btreeAccessors);
+            failure = CleanupUtils.destroy(failure, rangeCursors);
             if (failure != null) {
                 throw HyracksDataException.create(failure);
             }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/impls/LSMInvertedIndexOpContext.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/impls/LSMInvertedIndexOpContext.java
index cf95f78..1fe4bd2 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/impls/LSMInvertedIndexOpContext.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/impls/LSMInvertedIndexOpContext.java
@@ -23,7 +23,7 @@
 
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.storage.am.common.impls.NoOpIndexAccessParameters;
 import org.apache.hyracks.storage.am.common.tuples.PermutingTupleReference;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMIndex;
@@ -103,8 +103,8 @@
             return;
         }
         destroyed = true;
-        Throwable failure = DestroyUtils.destroy(null, mutableInvIndexAccessors);
-        failure = DestroyUtils.destroy(failure, deletedKeysBTreeAccessors);
+        Throwable failure = CleanupUtils.destroy(null, mutableInvIndexAccessors);
+        failure = CleanupUtils.destroy(failure, deletedKeysBTreeAccessors);
         if (failure != null) {
             throw HyracksDataException.create(failure);
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-rtree/src/main/java/org/apache/hyracks/storage/am/lsm/rtree/impls/LSMRTreeOpContext.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-rtree/src/main/java/org/apache/hyracks/storage/am/lsm/rtree/impls/LSMRTreeOpContext.java
index c3c74b8..858f6e0 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-rtree/src/main/java/org/apache/hyracks/storage/am/lsm/rtree/impls/LSMRTreeOpContext.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-rtree/src/main/java/org/apache/hyracks/storage/am/lsm/rtree/impls/LSMRTreeOpContext.java
@@ -23,7 +23,7 @@
 
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.util.DestroyUtils;
+import org.apache.hyracks.api.util.CleanupUtils;
 import org.apache.hyracks.storage.am.btree.impls.BTree;
 import org.apache.hyracks.storage.am.btree.impls.BTreeOpContext;
 import org.apache.hyracks.storage.am.common.api.ITreeIndexFrameFactory;
@@ -138,10 +138,10 @@
             return;
         }
         destroyed = true;
-        Throwable failure = DestroyUtils.destroy(null, mutableRTreeAccessors);
-        failure = DestroyUtils.destroy(failure, rtreeOpContexts);
-        failure = DestroyUtils.destroy(failure, mutableBTreeAccessors);
-        failure = DestroyUtils.destroy(failure, btreeOpContexts);
+        Throwable failure = CleanupUtils.destroy(null, mutableRTreeAccessors);
+        failure = CleanupUtils.destroy(failure, rtreeOpContexts);
+        failure = CleanupUtils.destroy(failure, mutableBTreeAccessors);
+        failure = CleanupUtils.destroy(failure, btreeOpContexts);
         if (failure != null) {
             throw HyracksDataException.create(failure);
         }
