Mikhail Pochatkin created IGNITE-21681:
------------------------------------------

             Summary: QueryCriteriaAsyncCursor doesn't satisfy AsyncCursor 
contract
                 Key: IGNITE-21681
                 URL: https://issues.apache.org/jira/browse/IGNITE-21681
             Project: Ignite
          Issue Type: Improvement
            Reporter: Mikhail Pochatkin
            Assignee: Andrey Novikov


Current implementation of QueryCriteriaAsyncCursor 
{code:java}
/** {@inheritDoc} */
@Override
public CompletableFuture<? extends AsyncCursor<T>> fetchNextPage() {
    return ars.fetchNextPage()
            .thenApply((rs) -> {
                if (!hasMorePages()) {
                    closeAsync();
                }

                return new QueryCriteriaAsyncCursor<>(rs, mapper, closeRun);
            });
} {code}
doesn't comply with the contract described in AsyncCursor
{code:java}
* @return A future which will be completed when next page will be fetched and 
set as the current page.
*     The future will return {@code this} for chaining. {code}
Implementation must returns `this` in future, not the new instance



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to