valepakh commented on code in PR #7921:
URL: https://github.com/apache/ignite-3/pull/7921#discussion_r3032261501
##########
modules/api/src/main/java/org/apache/ignite/lang/CancelHandleImpl.java:
##########
@@ -69,6 +72,8 @@ static final class CancellationTokenImpl implements
CancellationToken {
private final ArrayDeque<Cancellation> cancellations = new
ArrayDeque<>();
+ private final List<Runnable> listeners = new ArrayList<>();
Review Comment:
Not fixing this. `CancelHandle` is always created per-operation (per SQL
query, compute job, JDBC statement, etc.) and becomes unreachable once the
operation completes. The entire object graph — including `cancellations`,
`listeners`, and everything they reference — becomes eligible for GC together.
Clearing the collections would only help if the handle was long-lived, which it
never is.
Fixed the related inconsistency though — listener exceptions in `listen()`
called after cancellation are now wrapped in `IgniteException` consistently
with the `cancel()` path.
--
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]