[SERVER-27223] Make Command::parseNs() more efficient Created: 30/Nov/16  Updated: 05/Apr/17  Resolved: 02/Dec/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.4.1, 3.5.1

Type: Improvement Priority: Major - P3
Reporter: James Wahlin Assignee: James Wahlin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Backport Completed:
Sprint: Query 2016-12-12
Participants:
Linked BF Score: 0

 Description   

Command::parseNs() creates several string objects. This can be made more efficient by creating and returning a single string using str::stream().

We should also remove the "#if defined(CLC)" as use of the CLC definition for debugging was removed from the server under SERVER-4328.



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

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-27223 Make Command::parseNs() more efficient

(cherry picked from commit e5adf96328dfa610367960ff9edf3df0e76fef15)
Branch: v3.4
https://github.com/mongodb/mongo/commit/1c5431c30b0a00de60d8afb47818f08d14d6370f

Comment by Githook User [ 02/Dec/16 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-27223 Make Command::parseNs() more efficient
Branch: master
https://github.com/mongodb/mongo/commit/e5adf96328dfa610367960ff9edf3df0e76fef15

Comment by James Wahlin [ 01/Dec/16 ]

Change reverted as the move from valuestr() to valueStringData() now allows findCmd with a collection name if "\0".

Will change this patch to use valuestr() as was done in the original. This will allow for easy/safe backport to 3.4 as behavior will be the same but with improved performance. marko.vojvodic will then make the change from valuestr() to valueStringData() as part of his work for SERVER-24128 (which adds validation to reject embedded null bytes in NamespaceString).

Comment by Githook User [ 01/Dec/16 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: Revert "SERVER-27223 Make Command::parseNs() more efficient"

This reverts commit a2fa506b1d47ed054dd42be291b352e946321737.
Branch: master
https://github.com/mongodb/mongo/commit/894e4d0e71c94d2fcf9848a45bde2d64c8ad6c3a

Comment by Githook User [ 01/Dec/16 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-27223 Make Command::parseNs() more efficient
Branch: master
https://github.com/mongodb/mongo/commit/a2fa506b1d47ed054dd42be291b352e946321737

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