[ASTERIXDB-2204][STO] Fix implementations and usages of IIndexCursor
- user model changes: no
- storage format changes: no
- interface changes: yes
- IIndexCursor.close() is now idempotent and can be called on
a closed cursor.
- IIndexCursor.destroy() is now idempotent and can be called
on a destroyed cursor.
- Add IIndexAccessor.destroy() letting the accessor know it is
safe to destroy its reusable cursors and operation contexts.
- Add IIndexOperationContext.destroy() letting the context
know that the user is done with it and allow it to release
resources
details:
- Previously, implementations of the IIndexCursor interface
didn't enforce the interface contract. This change enforces
the contract for all the implementations.
- With the enforcement of the contract, all the users of the
cursors are expected to follow and enforce the expected lifecycle.
- Test cases were added.
Change-Id: I98a7a8b931eb24dbe11bf2bdc61b754ca28ebdf9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2324
Reviewed-by: Michael Blow <mblow@apache.org>
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/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-btree-test/pom.xml b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-btree-test/pom.xml
index b618834..45d6989 100644
--- a/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-btree-test/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-btree-test/pom.xml
@@ -67,6 +67,13 @@
</dependency>
<dependency>
<groupId>org.apache.hyracks</groupId>
+ <artifactId>hyracks-storage-am-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hyracks</groupId>
<artifactId>hyracks-api</artifactId>
<version>${project.version}</version>
</dependency>