[SERVER-49771] Coverity analysis defect 115959: Missing move assignment operator (reverse_radix_iterator) Created: 21/Jul/20  Updated: 29/Oct/23  Resolved: 28/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-05-31, Execution Team 2021-06-14
Participants:

 Description   

Missing move assignment operator

This class does not have a user-written move assignment operator and its copy assignment operator is found to be applied to rvalue(s), which can be moved to possibly enhance program performance had the move assignment operator been in place. Class lacks a user-written move assignment operator
/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_radix_store.h:274: MISSING_MOVE_ASSIGNMENT 115959 Class "mongo::ephemeral_for_test::RadixStore<std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::reverse_radix_iterator<std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const *, std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const &>" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalue(s), where a move assignment may be faster.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 28/May/21 ]

Author:

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

Message: SERVER-49771 Add move assignment operator to reverse_radix_iterator
Branch: master
https://github.com/mongodb/mongo/commit/2d9913e04d2373a78968fd89fa939f6c2dce8549

Comment by Henrik Edin [ 21/Jul/20 ]

It would be a small improvement to add a move assignment operator to reverse_radix_iterator.

Generated at Thu Feb 08 05:20:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.