<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:06 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-801] Create option to not compile BSON regular expressions to Java Pattern</title>
                <link>https://jira.mongodb.org/browse/JAVA-801</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The Java driver can retrieve Regex-type BSON values from MongoDB under several circumstances:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;When a regex has been stored in a document, then queried&lt;/li&gt;
	&lt;li&gt;When a regex query is in progress on another connection and the driver queries &lt;tt&gt;$cmd.sys.inprog&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;When a regex query is stored in &lt;tt&gt;system.profile&lt;/tt&gt; and the driver queries the profile&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;These regexes might be intended by their authors to be PCRE because they&apos;re intended to run on server. However, they need not always be. We can&apos;t make any predictions about the content of a BSON regex or what its author intended it to match.&lt;/p&gt;

&lt;p&gt;But the Java driver compiled BSON regexes into java.util.Pattern using Pattern.compile. If a regex can&apos;t be compiled, then the whole document is unparsable and there&apos;s no workaround. Even if the regex is parsable, we don&apos;t know if it will &lt;b&gt;behave&lt;/b&gt; as intended, since we don&apos;t know if java.util.Pattern matches the flavor the regex&apos;s author intended it to run on.&lt;/p&gt;

&lt;p&gt;Finally, it&apos;s not likely that most regexes retrieved from the server are ever executed client-side, so greedily compiling all regexes is wasteful.&lt;/p&gt;

&lt;p&gt;We should add a way to optionally disable compilation. If compilation is disabled, represent the BSON regexes some other way, e.g. a MongoRegex class that contains the uncompiled regex pattern as a string plus its options.&lt;/p&gt;

&lt;p&gt;Additionally, add a means of sending a PCRE to the server &lt;b&gt;even&lt;/b&gt; &lt;b&gt;if&lt;/b&gt; its pattern can&apos;t be compiled by Pattern, and/or its flags aren&apos;t supported by the Pattern.&lt;/p&gt;

&lt;p&gt;With the new API, disable auto-compilation by default, with the option to turn it back on.  &lt;/p&gt;</description>
                <environment></environment>
        <key id="70649">JAVA-801</key>
            <summary>Create option to not compile BSON regular expressions to Java Pattern</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2013 20:24:47 +0000</created>
                <updated>Tue, 31 Mar 2015 20:10:07 +0000</updated>
                            <resolved>Fri, 13 Jun 2014 16:10:46 +0000</resolved>
                                                    <fixVersion>3.0.0</fixVersion>
                                    <component>Codecs</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="869529" author="jeff.yemin" created="Tue, 31 Mar 2015 20:10:07 +0000"  >&lt;p&gt;Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released.&lt;/p&gt;</comment>
                            <comment id="305790" author="uladzimir_mihura@epam.com" created="Thu, 4 Apr 2013 10:12:55 +0000"  >&lt;p&gt;Is this something that will go into MongoClientOptions to be configured while connecting to server?&lt;/p&gt;

&lt;p&gt;-vova&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="70645">DRIVERS-82</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrfcyf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1972</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="161">Sprint 2 - May 5 - May 23</customfieldvalue>
    <customfieldvalue id="185">Sprint 3 - May 27 - June 13</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>