ptupitsyn commented on a change in pull request #9271:
URL: https://github.com/apache/ignite/pull/9271#discussion_r676448008
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryImpl.java
##########
@@ -142,8 +142,10 @@ private static CacheEntryEventFilter getJavaFilter(Object
filter, GridKernalCont
qry.setLocalListener(this);
- //noinspection deprecation
- qry.setRemoteFilter(this); // Filter must be set always for
correct resource release.
+ if (hasFilter || javaFilter != null) {
+ //noinspection deprecation
+ qry.setRemoteFilter(this); // Filter must be set always
for correct resource release.
Review comment:
Please note the comment: we can't make this call conditional. If we
don't call `setRemoteFilter`, then `onQueryUnregister()` won't be called and
platform resources won't be released.
I think we should fix `SecurityAwareFilter` instead to handle nulls
correctly.
Alternatively, fix `writeReplace` to write a dummy filter instead of null,
but this will affect performance.
--
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]