korlov42 commented on code in PR #6950:
URL: https://github.com/apache/ignite-3/pull/6950#discussion_r2522244834
##########
modules/core/src/main/java/org/apache/ignite/internal/sql/SyncResultSetAdapter.java:
##########
@@ -107,39 +106,32 @@ public T next() {
private static class IteratorImpl<T> implements Iterator<T> {
private AsyncResultSet<T> curRes;
- private CompletionStage<? extends AsyncResultSet<T>> nextPageStage;
-
private Iterator<T> curPage;
IteratorImpl(AsyncResultSet<T> ars) {
curRes = ars;
-
- advance();
+ curPage = ars.currentPage().iterator();
Review Comment:
I would say that prefetch is more crucial for thin client rather that for
embedded. In case of embedded the next page is few layers of abstractions away,
but for thin Clint the whole page should be serialized, deserialized, and sent
over the network.
I think, one might consider this as performance regression since now we will
have latency spikes switching between pages.
Perhaps, we can address the original problem by tracking pending requests in
the cursor, and in case `close` is failed with `resource not found`, we could
double check the state of cursor after completion of all pending requests. WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]