xtern commented on PR #6950:
URL: https://github.com/apache/ignite-3/pull/6950#issuecomment-3522557707
> > @ptupitsyn the issue describes a scenario where a user might receive a
flaky error when closing a cursor using AsyncResultSet.
> > ```
> > var rs = sql.executeAsync(null, "SELECT...").join();
> >
> > rs.fetchNextPage();
> > rs.close(); // can throw "resource not found"
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > This error may be completely unclear to the user.
> > Are we going to do something with this?
>
> Our cursors don't support concurrent operations like this. Not sure if we
can do anything sensible here. Throw a better exception?
you right, I suppose that
```
fetchNextPage()
fetchNextPage()
```
may lead to something more unpredictable.
One of the solutions probably:
- fetchNextPage() returns always the same future until response future and
don't allow concurrent
> > @ptupitsyn the issue describes a scenario where a user might receive a
flaky error when closing a cursor using AsyncResultSet.
> > ```
> > var rs = sql.executeAsync(null, "SELECT...").join();
> >
> > rs.fetchNextPage();
> > rs.close(); // can throw "resource not found"
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > This error may be completely unclear to the user.
> > Are we going to do something with this?
>
> Our cursors don't support concurrent operations like this. Not sure if we
can do anything sensible here. Throw a better exception?
I don't have a clear idea of how to resolve this.
Initially, the idea was to not return this exception to the user but only
log it, but now I think that's also a bad approach.
By the way, there's a typo in my example above – it calls the `close`
method, while the AsyncResultSet method is called `closeAsync`, so the user is
unlikely to encounter this issue.
In general, I agree to do nothing about this for now. If this problem turns
out to be relevant for the new JDBC, I'll consider it in a separate ticket.
--
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]