<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:02:16 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-4512] Allow customization of the DNS client</title>
                <link>https://jira.mongodb.org/browse/JAVA-4512</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&lt;b&gt;Updated Description&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;A new interface, &lt;tt&gt;com.mongodb.spi.dns.DnsClient&lt;/tt&gt; will be created that defines a minimal API for a DNS provider.  Additionally, a service provider interface, &lt;tt&gt;com.mongodb.spi.dns.DnsClientProvider&lt;/tt&gt; will be created.  The latter will be used by the driver to look up implementations of &lt;tt&gt;DnsClient&lt;/tt&gt; via the mechanisms described in &lt;tt&gt;java.util.ServiceLoader&lt;/tt&gt;.  If no implementations are found, the driver will fallback to using JNDI for looking up SRV and TXT records (which is the current behavior).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Original Description&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;When resolving mongo+srv:// URLs, the MongoDB client (in Java) uses JNDI. However, with GraalVM, JNDI is not supported when building native executables.&#160;&lt;/p&gt;

&lt;p&gt;At the moment, in Quarkus, we have a &quot;substitution&quot; that replaces the default DNS client when building a native executable.&#160;&lt;/p&gt;

&lt;p&gt;It would be great to avoid substituting and instead allow the user to customize the DNS client they want to use (defaulting to the current one). There is already a DNS client interface.&lt;/p&gt;

&lt;p&gt;There are two possibilities:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Allows the user to pass a DNS client interface implementation class when configuring the driver&lt;/li&gt;
	&lt;li&gt;Exposes the DNS client interface as an SPI. When there is a provider on the classpath, use that provider instead of the default one.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1993675">JAVA-4512</key>
            <summary>Allow customization of the DNS client</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="13201">Fixed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="cescoffi@redhat.com">Clement Escoffier</reporter>
                        <labels>
                            <label>QP-priority</label>
                            <label>external-user</label>
                            <label>graalvm</label>
                            <label>quarkus</label>
                    </labels>
                <created>Thu, 3 Mar 2022 09:13:56 +0000</created>
                <updated>Sat, 28 Oct 2023 11:20:49 +0000</updated>
                            <resolved>Fri, 25 Mar 2022 15:38:29 +0000</resolved>
                                                    <fixVersion>4.6.0</fixVersion>
                                    <component>Cluster Management</component>
                                        <votes>2</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5347328" author="jeff.yemin" created="Fri, 14 Apr 2023 12:04:21 +0000"  >&lt;p&gt;Looking a bit more closely, I see that the &lt;tt&gt;LongObjectHashMap&lt;/tt&gt; is used only for testing purposes, so it&apos;s thread-safety is not a real concern here.&lt;/p&gt;</comment>
                            <comment id="5347161" author="jeff.yemin" created="Fri, 14 Apr 2023 11:28:09 +0000"  >&lt;p&gt;Initial read of the source code suggests that &lt;tt&gt;io.vertx.core.dns.impl.DnsClientImpl&lt;/tt&gt;, on which &lt;tt&gt;io.quarkus.mongodb.runtime.dns.MongoDnsClient&lt;/tt&gt; depends, is not thread-safe.  as it has a field of type &lt;tt&gt;io.netty.util.collection.LongObjectHashMap&lt;/tt&gt; that has no internal synchronization and is not synchronized externally either.&lt;/p&gt;

&lt;p&gt;CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=valentin.kovalenko%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;valentin.kovalenko@mongodb.com&quot;&gt;valentin.kovalenko@mongodb.com&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5346559" author="JIRAUSER1265480" created="Fri, 14 Apr 2023 04:06:52 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin@mongodb.com&quot;&gt;jeff.yemin@mongodb.com&lt;/a&gt; here it is: &lt;a href=&quot;https://github.com/quarkusio/quarkus/blob/main/extensions/mongodb-client/runtime/src/main/java/io/quarkus/mongodb/runtime/dns/MongoDnsClient.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/quarkusio/quarkus/blob/main/extensions/mongodb-client/runtime/src/main/java/io/quarkus/mongodb/runtime/dns/MongoDnsClient.java&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5345932" author="jeff.yemin" created="Thu, 13 Apr 2023 21:00:00 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gegastaldi%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;gegastaldi@gmail.com&quot;&gt;gegastaldi@gmail.com&lt;/a&gt; or &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=cescoffi%40redhat.com&quot; class=&quot;user-hover&quot; rel=&quot;cescoffi@redhat.com&quot;&gt;cescoffi@redhat.com&lt;/a&gt;, can you point us to the DnsClient implementation in Quarkus?  We&apos;re wondering if it&apos;s already thread-safe, since we are considering adding a requirement that it be so. Currently we don&apos;t document DnsClient one way or the other in terms of thread safety, and the driver as written currently doesn&apos;t require it to be so.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/1104#discussion_r1160733871&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/1104#discussion_r1160733871&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4435407" author="xgen-internal-githook" created="Fri, 25 Mar 2022 15:38:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@mongodb.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Lookup DnsClientProvider via ServiceLoader (#893)&lt;/p&gt;

&lt;p&gt;Default to existing JNDI-based implementation&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-4512&quot; title=&quot;Allow customization of the DNS client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-4512&quot;&gt;&lt;del&gt;JAVA-4512&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/eeb2681ccf7212dca72aa8f2eca3e8576511b058&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/eeb2681ccf7212dca72aa8f2eca3e8576511b058&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4408953" author="JIRAUSER1265480" created="Sun, 13 Mar 2022 17:16:30 +0000"  >&lt;p&gt;I created a PR in &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/892&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/892&lt;/a&gt;&#160;with a proposed solution for this issue&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY23Q2</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i04nz2:9</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>