[
https://issues.apache.org/jira/browse/GEODE-6989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953617#comment-16953617
]
ASF subversion and git services commented on GEODE-6989:
--------------------------------------------------------
Commit 66ac20104956a5d3f021faacdfc5c9c7fe1a61d9 in geode's branch
refs/heads/develop from Juan José Ramos
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=66ac201 ]
GEODE-6989: Cache OQL Authorized Methods (#4136)
The MethodDispatch and AttributeDescriptor classes now use the
QueryExecutionContext to cache the result of already authorized
methods; thus preventing the OQL engine from invoking the authorizer
for every object traversed and, instead, only invoke it once in the
lifetime of a query for every new method seen.
> Use Caching for Already Authorized Methods
> ------------------------------------------
>
> Key: GEODE-6989
> URL: https://issues.apache.org/jira/browse/GEODE-6989
> Project: Geode
> Issue Type: New Feature
> Components: querying
> Reporter: Juan Ramos
> Assignee: Juan Ramos
> Priority: Major
> Labels: GeodeCommons
> Time Spent: 4h
> Remaining Estimate: 0h
>
> We already
> [cache|https://github.com/apache/geode/blob/rel/v1.9.0/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledOperation.java#L267-L285]
> created instances of {{MethodDispatch}} to avoid creating them for every
> query. Modify the {{MethodDispatch}} class to remember whether the method was
> allowed by a previous invocation, preventing further calls to the respective
> {{authorizer}} if it was. We also
> [cache|https://github.com/apache/geode/blob/rel/v1.9.0/geode-core/src/main/java/org/apache/geode/cache/query/internal/AttributeDescriptor.java#L148-L170]
> within the {{AttributeDescriptor}} class the member already read by
> reflection for a particular attribute to avoid doing it again and again in
> every query. Modify the {{AttributeDescriptor}} class to remember whether the
> accessor method was allowed by a previous invocation, preventing further
> calls to the respective {{authorizer}} if it was.
> Currently this internal caching is done statically through a static
> {{ConcurrentMap}}, we want something to store this information within the
> {{QueryExecutionContext}} so the authorization logic is executed once per
> query.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)