[SERVER-22057] Refactor OpObserver::onUpdate, pass updated document directly as parameter Created: 04/Jan/16  Updated: 05/Feb/16  Resolved: 15/Jan/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.3.1

Type: Improvement Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding E (01/08/16), Sharding F (01/29/16)
Participants:

 Description   

Pass updated doc directly into onUpdate when it's available to the caller, so it doesn't have to be refetched from memory/disk later in the sharding logOp code.



 Comments   
Comment by Githook User [ 15/Jan/16 ]

Author:

{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}

Message: SERVER-22057 refactor OpObserver::onUpdate and MigrationSourceManager::logUpdateOp to directly take the updated document
Branch: master
https://github.com/mongodb/mongo/commit/2d8008289b9d075c56841dc08830bb7cff28aeaf

Comment by Scott Hernandez (Inactive) [ 04/Jan/16 ]

Great, when you do please also include the why/use-case so there is some context for this change.

Comment by Dianna Hohensee (Inactive) [ 04/Jan/16 ]

You're right I didn't look into it closely enough before I made the ticket. I shall update the description/title to what I really want.

Comment by Scott Hernandez (Inactive) [ 04/Jan/16 ]

Seems like it is already passed in...

updateDocument(OperationContext* txn,
                                        const RecordId& oldLocation,
                                        const Snapshotted<BSONObj>& oldDoc,
                                        const BSONObj& newDoc,
                                        bool enforceQuota,
                                        bool indexesAffected,
                                        OpDebug* debug,
                                        oplogUpdateEntryArgs& args);

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