Clone
Abdullah Alamoudi <bamousaa@gmail.com>
committed
on 12 Feb 18
[ASTERIXDB-2204][STO] Fix implementations and usages of IIndexCursor
- user model changes: no
- storage format changes: no
- interface chang… Show more
[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>

Show less

master + 3 more