You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Nitin Gupta (Jira)" <ji...@apache.org> on 2022/02/04 04:08:00 UTC

[jira] [Commented] (OAK-9651) Protection against very large queries

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

Nitin Gupta commented on OAK-9651:
----------------------------------

1.22 : [https://github.com/apache/jackrabbit-oak/commit/9c0cca33bdaf03becf936e133eda32d809b188a2] 

trunk : [https://github.com/apache/jackrabbit-oak/commit/6703be860c863ddb96eae01eea5e220710b2ab58] 

> Protection against very large queries
> -------------------------------------
>
>                 Key: OAK-9651
>                 URL: https://issues.apache.org/jira/browse/OAK-9651
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Mohit Kataria
>            Assignee: Mohit Kataria
>            Priority: Major
>             Fix For: 1.42.0
>
>
> There are cases where system runs out of memory because very large queries (5 MB / around 30'000 lines of text each) were run and QueryStatsMbean consuming huge memory.
> We should have some protection against such queries. Options are:
>  * We can log a warning if the query is longer than e.g. 100 KB.
>  * A query longer than e.g. 1 MB might just throw an exception.
>  * The query statistic should probably not collect statistic for such long queries. We could shrink the query text in the statistic collection to e.g. at most 2 KB per query. Truncating it, or, probably better, only retaining the first and last 1 KB.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)