alex-plekhanov commented on code in PR #11620:
URL: https://github.com/apache/ignite/pull/11620#discussion_r1816393213


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java:
##########
@@ -1143,10 +1159,9 @@ protected void runQuery(GridCacheQueryInfo qryInfo) {
                 IgniteSpiCloseableIterator iter;
                 GridCacheQueryType type;
 
-                res = loc ?
-                    executeQuery(qry, trans, loc, taskName,
-                        recipient(qryInfo.senderId(), qryInfo.requestId())) :
-                    queryResult(qryInfo, taskName);
+                res = loc

Review Comment:
   Original code formating (`?` at the EOL) is more common in Ignite.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java:
##########
@@ -882,21 +876,52 @@ private GridCloseableIterator scanIterator(final 
GridCacheQueryAdapter<?> qry, I
         }
     }
 
+    /** */
+    private @Nullable IgniteClosure<?, ?> prepareTransformer(IgniteClosure<?, 
?> transformer) throws IgniteCheckedException {
+        return SecurityUtils.sandboxedProxy(cctx.kernalContext(), 
IgniteClosure.class, injectResources(transformer));
+    }
+
+    /** */
+    private @Nullable InternalScanFilter<K, V> 
internalFilter(IgniteBiPredicate<K, V> keyValFilter) throws 
IgniteCheckedException {
+        if (keyValFilter == null)
+            return null;
+
+        try {
+            if (keyValFilter instanceof PlatformCacheEntryFilter)
+                ((PlatformCacheEntryFilter)keyValFilter).cacheContext(cctx);
+            else
+                injectResources(keyValFilter);
+
+            keyValFilter = SecurityUtils.sandboxedProxy(cctx.kernalContext(), 
IgniteBiPredicate.class, keyValFilter);
+
+            return new InternalScanFilter<>(keyValFilter);
+        }
+        catch (IgniteCheckedException | RuntimeException e) {
+            if (keyValFilter instanceof PlatformCacheEntryFilter)
+                ((PlatformCacheEntryFilter)keyValFilter).onClose();

Review Comment:
   I didn't find corresponding error handling in the original code. Did I miss 
something? 



-- 
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]

Reply via email to