[SERVER-28992] Cleanup mongos write commands execution Created: 26/Apr/17  Updated: 30/Oct/23  Resolved: 22/Dec/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.6.2, 3.7.1

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.6
Sprint: Sharding 2017-05-08, Sharding 2017-05-29, Sharding 2017-06-19, Sharding 2018-01-01
Participants:

 Description   

The mongos write commands execution is overly complex, manages bare pointers and swaths of memory. This ticket is to combine any miscellaneous cleanup which can be done to simplify them.



 Comments   
Comment by Githook User [ 29/Dec/17 ]

Author:

{'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-28992 Cleanup and remove unused code from write commands

No functional changes, just getting rid of some unnecessary overhead.

  • Get rid of the extra TargetedBatchSizeMap during write command processing
  • Do not use pointers in the write commands error tracking
  • Remove unused code from the commands parsing
  • Get rid of unused code from the write commands tests
  • Make the write commands targeter return actual ShardEndpoint(s) instead of populating arrays of pointers. This saves both on memory allocations and makes the code simpler to follow.

(cherry picked from commit 890051d8166e668442aff70cfcde3cb71ae6115f)
(cherry picked from commit 10e3ce2d905ca3afc1e5949da2daa3353740171a)
(cherry picked from commit 98f30b75b31c54464d5a907f435c15121a6c5353)
Branch: v3.6
https://github.com/mongodb/mongo/commit/1b15f47f9a53616394a7f4fde4796be499e7b9e6

Comment by Githook User [ 29/Dec/17 ]

Author:

{'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-28992 Make the write commands targeter return actual ShardEndpoint(s)

... instead of populating arrays of pointers. This saves both on memory
allocations and makes the code simpler to follow.
Branch: master
https://github.com/mongodb/mongo/commit/98f30b75b31c54464d5a907f435c15121a6c5353

Comment by Githook User [ 29/Dec/17 ]

Author:

{'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-28992 Get rid of unused code from the write commands tests
Branch: master
https://github.com/mongodb/mongo/commit/10e3ce2d905ca3afc1e5949da2daa3353740171a

Comment by Githook User [ 22/Dec/17 ]

Author:

{'username': 'kaloianm', 'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-28992 Cleanup and remove unused code from write commands

No functional changes, just getting rid of some unnecessary overhead.

Comment by Githook User [ 29/Apr/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-28992 Make BatchWriteOp contain a vector of WriteOp

... instead of a dynamically allocated array and in-place
construction/destruction.
Branch: master
https://github.com/mongodb/mongo/commit/2e8e60bfef83ac9c7bf494b0f80977686cb1b772

Comment by Githook User [ 27/Apr/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-28992 Fold BatchWriteStats into BatchWriteOp

There is no need for that structure to be dynamically allocated or to even
be a separate structure.
Branch: master
https://github.com/mongodb/mongo/commit/e7fa2c203c9790377f84f9d2e2c941f0e3d24007

Comment by Githook User [ 27/Apr/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-28992 Cleanup write commands execution

Generated at Thu Feb 08 04:19:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.