[CSHARP-714] New AscendingGuidGenerator Created: 27/Mar/13  Updated: 20/Mar/14  Resolved: 04/Apr/13

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 1.8.1

Type: New Feature Priority: Minor - P4
Reporter: Robert Stam Assignee: Sridhar Nanjundeswaran
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CSHARP-700 Confirm intended behavior of CombGuid... Closed

 Description   

Add a new generator for GUIDs that generates GUIDs in ascending order. The algorithm will be similar to that for ObjectIds, and the 16 bytes of the GUID will be generated as follows:

8 bytes: Ticks from DateTime.UtcNow.Ticks
3 bytes: hash of machine name
2 bytes: low order bytes of process Id
3 bytes: increment

This is the same algorithm as generating an ObjectId except that a higher resolution 8 byte timestamp is used.

NOTE: in order for these GUIDs to be considered ascending by the server they must be stored using the new GuidRepresentation.Standard representation for GUIDs.



 Comments   
Comment by auto [ 04/Apr/13 ]

Author:

{u'date': u'2013-04-04T03:03:35Z', u'name': u'Sridhar Nanjundeswaran', u'email': u'sridhar@10gen.com'}

Message: CSHARP-714 : AscendingGuidGenerator and tests
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/2dede5031105c0cce0843fab898b13ac7154b234

Generated at Wed Feb 07 21:37:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.