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

Vikas Saurabh commented on OAK-8294:
------------------------------------

{quote}
bq. Moreover, do you think that maybe having a facility to have a list of 
patterns (each describing some part of the query) be useful (all patterns match 
required for that kind of config).

Sorry I don't understand.
{quote}
That was in context of what I was proposing to have exact string matches. So, 
for a query like
{noformat}
SELECT * FROM [some:Type] WHERE [rel/path/foo]='bar1' AND [foo]='bar' ...
{noformat}
the matching config could look like:
{noformat}
http://localhost:4502/oak:index/queryValidator.tidy.-1.json
{
  "jcr:primaryType": "nt:unstructured",
  "helloWorld": {
    "jcr:primaryType": "nt:unstructured",
    "patterns": ["SELECT * FROM [some:Type] WHERE [rel/path/foo]='", "' AND 
[foo]='", ']", ....],
    "requiredSameOrderMatch": true,
    "failQuery": true,
    "comment": "HelloTest"
    }
  }
{noformat}

> Make it possible to mark a (customer) query as bad and skip it
> --------------------------------------------------------------
>
>                 Key: OAK-8294
>                 URL: https://issues.apache.org/jira/browse/OAK-8294
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>         Attachments: OAK-8294.patch
>
>
> Application code can run all kinds of bad queries (reading a lot of data, 
> slow, high memory usage).
> The best solution is to fix the application of course. But that can take a 
> while, and until this is done, it would be good if bad queries can be blocked 
> in another way. Problematic queries would either just log a warning, or be 
> blocked (throw an exception when trying to run).
> Blocking should be possible via JMX, but also via persistent configuration 
> (in the repository), so that a restart remembers which queries are blocked.
> I don't think it's needed to stop already running queries, as the traversal 
> limit should solve this (it can be re-configured at runtime if needed). Also, 
> reading the patterns from the repository is only needed at startup (while 
> running, JMX can be used to temporarily add patterns).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to