<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:35 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>[CSHARP-700] Confirm intended behavior of CombGuidGenerator</title>
                <link>https://jira.mongodb.org/browse/CSHARP-700</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;The intended behavior of CombGuidGenerator is to provide a sequence of GUID values that are in ascending order. The original article regarding CombGuids is:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.informit.com/articles/article.aspx?p=25862&amp;amp;seqNum=7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.informit.com/articles/article.aspx?p=25862&amp;amp;seqNum=7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But it is not clear that the same generation algorithm that works for SQL Server works for MongoDB. For MongoDB the sort order of GUIDs might depend on:&lt;/p&gt;

&lt;p&gt;1. Which representation is being used for GUIDs (Standard, CSharpLegacy, etc...)&lt;br/&gt;
2. How the server compares two BinData values&lt;/p&gt;

&lt;p&gt;The task for this JIRA ticket is to investigate all the factors related to CombGuidGenerator and to make any changes as might be necessary (and to document the purpose and use of CombGuids).&lt;/p&gt;</description>
                <environment></environment>
        <key id="67986">CSHARP-700</key>
            <summary>Confirm intended behavior of CombGuidGenerator</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="robert@mongodb.com">Robert Stam</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Mar 2013 14:20:42 +0000</created>
                <updated>Thu, 20 Mar 2014 14:36:41 +0000</updated>
                            <resolved>Thu, 4 Apr 2013 14:41:22 +0000</resolved>
                                    <version>1.8</version>
                                    <fixVersion>1.8.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="305913" author="auto" created="Thu, 4 Apr 2013 14:40:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-04-04T14:35:07Z&apos;, u&apos;name&apos;: u&apos;rstam&apos;, u&apos;email&apos;: u&apos;robert@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-700&quot; title=&quot;Confirm intended behavior of CombGuidGenerator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-700&quot;&gt;&lt;del&gt;CSHARP-700&lt;/del&gt;&lt;/a&gt;: Improvements to CombGuidGenerator and its unit tests.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/05b35a03454e873f87bece6a7ce5c0aa6e199b7e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/05b35a03454e873f87bece6a7ce5c0aa6e199b7e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="299884" author="rstam" created="Wed, 27 Mar 2013 15:34:27 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-714&quot; title=&quot;New AscendingGuidGenerator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-714&quot;&gt;&lt;del&gt;CSHARP-714&lt;/del&gt;&lt;/a&gt; for the new AscendingGuidGenerator that will usually be more useful with MongoDB than CombGuidGenerator.&lt;/p&gt;</comment>
                            <comment id="299835" author="rstam" created="Wed, 27 Mar 2013 14:46:25 +0000"  >&lt;p&gt;One subtlety about &lt;b&gt;why&lt;/b&gt; the CombGuid generator algorithm generates GUIDs that are good for SQL Server clustered indexes has to do with the very odd way SQL Server compares GUIDs. See:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms254976.aspx&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://msdn.microsoft.com/en-us/library/ms254976.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That explains why CombGuid makes the last 6 bytes of the GUID ascending, and doesn&apos;t care that the high order bytes of the GUIDs it generates are random.&lt;/p&gt;

&lt;p&gt;However, this means that the CombGuid generator algorithm is &lt;b&gt;only&lt;/b&gt; useful when generating GUIDs for SQL Server, and therefore has limited usefulness when generating _id values for MongoDB.&lt;/p&gt;

&lt;p&gt;We won&apos;t deprecate the CombGuidGenerator because there is one plausible use case: you are generating GUIDs for documents that will eventually be copied to SQL Server and you therefore want to use the CombGuid generator.&lt;/p&gt;

&lt;p&gt;We will add new Guid generators for MongoDB that generate GUIDs that the MongoDB server will consider ascending.&lt;/p&gt;</comment>
                            <comment id="286266" author="rstam" created="Mon, 11 Mar 2013 15:09:57 +0000"  >&lt;p&gt;If we end up providing a different algorithm for generating GUIDs than CombGuidGenerator I think we should also use a new name (something like AscendingGuidGenerator or SequentialGuidGenerator).&lt;/p&gt;

&lt;p&gt;We can keep the existing CombGuidGenerator which might have some usefulness in situations where data might eventually be exported to SQL Server (or if for no other reason than backward compatibility).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="69895">CSHARP-714</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|hrmmsf:</customfieldvalue>

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