<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:35:42 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-61] Error in MongoDB.Bson.BsonReader.ReadElementType(Int32 typeNumber) when reading type Timestamp</title>
                <link>https://jira.mongodb.org/browse/CSHARP-61</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;The method ReadElementType does not handle BsonType.Timestamp.&lt;/p&gt;

&lt;p&gt;This issue shows ups when the mongodb server is running in replication mode and the driver queries the GetLastError from the DB after performing a save/update operation.&lt;br/&gt;
The server responds (with the result as per the spec for OP_REPLY &lt;a href=&quot;http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol#MongoWireProtocol-OPREPLY&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol#MongoWireProtocol-OPREPLY&lt;/a&gt;) with 1 document&lt;/p&gt;

&lt;p&gt;The hex dump for the BSON document is &lt;/p&gt;

&lt;p&gt;3F-00-00-00-0A-65-72-72-00-08-75-70-64-61-74-65-64-45-78-69-73-74-69-6E-67-00-01-10-6E-00-01-00-00-00-11-6C-61-73-74-4F-70-00-01-00-00-00-84-2F-81-4C-01-6F-6B-00-00-00-00-00-00-00-F0-3F-00&lt;/p&gt;

&lt;p&gt;which when translate to JSON should look like&lt;br/&gt;
{&lt;br/&gt;
        &quot;err&quot; : null,&lt;br/&gt;
        &quot;updatedExisting&quot; : true,&lt;br/&gt;
        &quot;n&quot; : 1,&lt;br/&gt;
        &quot;lastOp&quot; : &lt;/p&gt;
{
                &quot;t&quot; : 1283534737000,
                &quot;i&quot; : 1
        }
&lt;p&gt;,&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;But the BsonReader throws an ArgumentOutOfRangeException exception.&lt;/p&gt;

&lt;p&gt;Adding (case BsonType.Timestamp&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; at line 143 in the file samus-mongodb-csharp-85d3524\source\MongoDB\Bson\BsonReader.cs would solve the issue.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Saleem&lt;/p&gt;



</description>
                <environment></environment>
        <key id="13000">CSHARP-61</key>
            <summary>Error in MongoDB.Bson.BsonReader.ReadElementType(Int32 typeNumber) when reading type Timestamp</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="lanwin">Steve Wagner</assignee>
                                    <reporter username="saleem">Syed Saleem Javid Brahmanapalli</reporter>
                        <labels>
                    </labels>
                <created>Fri, 3 Sep 2010 19:32:54 +0000</created>
                <updated>Wed, 19 Oct 2016 14:16:06 +0000</updated>
                            <resolved>Tue, 7 Sep 2010 08:46:50 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="17834" author="lanwin" created="Tue, 7 Sep 2010 08:46:50 +0000"  >&lt;p&gt;Timestamps are now supported. To map a timestamp you need to set the property to type MongoTimestamp. The deserializer can also convert it back to long. But be aware that when you write such document, the values is written as long instead of timestamp.&lt;/p&gt;

&lt;p&gt;You can find the change in my unstable branch.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/lanwin/mongodb-csharp/tree/1.6_prep&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/lanwin/mongodb-csharp/tree/1.6_prep&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="17812" author="lanwin" created="Sun, 5 Sep 2010 10:49:31 +0000"  >&lt;p&gt;I hope to start with that tomorrow.&lt;/p&gt;</comment>
                    </comments>
                    <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|hrh9xb:</customfieldvalue>

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