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 subversion and git services (Jira)" <ji...@apache.org> on 2021/09/18 23:19:00 UTC

[jira] [Commented] (GEODE-9582) redis glob pattern should never throw PatternSyntaxException

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

ASF subversion and git services commented on GEODE-9582:
--------------------------------------------------------

Commit c68a770431a042df899a28ae3b519f27edca3c21 in geode's branch refs/heads/develop from Darrel Schneider
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=c68a770 ]

GEODE-9582: make radish pattern match compatible with redis

GlobPattern no longer uses jdk regex but instead has a java
implementation based on the native redis glob pattern matcher.
@jdeppe-pivotal ran some basic JMH tests against a simple sometext* pattern (which is probably very common) and the new code appears to be slightly faster than the old jdk code.
GlobPattern now also has a unit test.

> redis glob pattern should never throw PatternSyntaxException
> ------------------------------------------------------------
>
>                 Key: GEODE-9582
>                 URL: https://issues.apache.org/jira/browse/GEODE-9582
>             Project: Geode
>          Issue Type: Bug
>          Components: redis
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.15.0
>
>
> The GlobPattern class converts a user's glob pattern into a pattern that is compiled by the jdk's Pattern.compile method. Some character sequences will cause the jdk to throw PatternSynaxException. For example giving it the bytes {{stringToBytes("\C")}} causes an exception.
>  Native redis with this same pattern treats it like just "C".
>  I think we need to look at every case in which the jdk compile throws PatternSynaxException and make sure GlobPattern will not submit a pattern to Pattern.compile that will cause it to throw.



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