[SERVER-21648] resmoke.py's dbHash should compare documents with an ordered dictionary Created: 24/Nov/15  Updated: 03/Dec/15  Resolved: 02/Dec/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.2.0-rc3
Fix Version/s: 3.2.0-rc6

Type: Bug Priority: Major - P3
Reporter: Robert Guo (Inactive) Assignee: Michael Grundy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-21647 $rename changes field ordering Closed
is related to SERVER-21613 Add CheckReplDBHash resmoke hook to j... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG D (12/11/15)
Participants:
Linked BF Score: 0

 Description   

Because MongoDB's dbHash command looks at the raw bytes of a BSON document, different ordering of the fields could produce different dbHashes. Resmoke.py currently compares the documents as unordered Python dictionaries.

max.hirschhorn suggests using pymongo's bson.SON which is an ordered dictionary. This is better than Python's ordered dictionary, which was only introduced in Python 2.7



 Comments   
Comment by Githook User [ 02/Dec/15 ]

Author:

{u'username': u'mgrundy', u'name': u'Mike Grundy', u'email': u'michael.grundy@10gen.com'}

Message: SERVER-21648 resmoke.py's dbHash should compare documents with an ordered dictionary
Branch: master
https://github.com/mongodb/mongo/commit/199111365322182a7c050dbd3cea8bce08885e3f

Generated at Thu Feb 08 03:57:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.