You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/01/04 19:32:00 UTC

[jira] [Commented] (GEODE-8795) Lucene queries should utilize post-processing if enabled

    [ https://issues.apache.org/jira/browse/GEODE-8795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17258447#comment-17258447 ] 

ASF GitHub Bot commented on GEODE-8795:
---------------------------------------

upthewaterspout commented on a change in pull request #5858:
URL: https://github.com/apache/geode/pull/5858#discussion_r551521495



##########
File path: geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/results/LuceneGetPageFunction.java
##########
@@ -65,15 +70,19 @@ public void execute(FunctionContext context) {
     }
   }
 
-  protected PageEntry getEntry(final Region region, final Object key) {
+  protected PageEntry getEntry(final Region region, final Object key,
+      SecurityService securityService, Object principal) {
     final EntrySnapshot entry = (EntrySnapshot) region.getEntry(key);
     if (entry == null) {
       return null;
     }
 
-    final Object value = entry.getRegionEntry().getValue(null);
+    Object value = entry.getRegionEntry().getValue(null);
     if (value == null || Token.isInvalidOrRemoved(value)) {
       return null;
+    } else if (securityService.needPostProcess()) {
+      value = securityService.postProcess(principal, region.getFullPath(), key, entry.getValue(),

Review comment:
       I'm a little concerned that `value` here might be a CachedDeserializable in some cases. I think this whole function and PageEntry class are designed to try to pass the value back to the user without deserializing it if it can. 
   
   However I can't think of a case that you didn't test already, so I guess it's doing the right thing.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Lucene queries should utilize post-processing if enabled
> --------------------------------------------------------
>
>                 Key: GEODE-8795
>                 URL: https://issues.apache.org/jira/browse/GEODE-8795
>             Project: Geode
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Jens Deppe
>            Priority: Major
>              Labels: pull-request-available
>
> Currently the entries returned by lucene queries are not able to be post-processed as other retrieval mechanisms can (gets, regular OQL queries, CQs).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)