[SERVER-46609] abortDatabaseIndexBuilds uses operator[] to check for existence in a map Created: 04/Mar/20  Updated: 29/Oct/23  Resolved: 04/Mar/20

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Eric Milkie
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
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-03-09
Participants:

 Description   

IndexBuildsCoordinator::_abortDatabaseIndexBuilds() needs to be fixed to use .find() on the map rather than operator[], which default constructs an element if it isn't there already. The code erroneously assumes this behavior does not happen.



 Comments   
Comment by Githook User [ 04/Mar/20 ]

Author:

{'username': 'milkie', 'name': 'Eric Milkie', 'email': 'milkie@10gen.com'}

Message: SERVER-46609 use .find instead of operator[] in _abortDatabaseIndexBuilds

(cherry picked from commit 9b7286dfc6d13c4befa684876902ec0c59336afd)
Branch: v4.4
https://github.com/mongodb/mongo/commit/b9da61bd322cdaa2549cb46b7d5adeb83fe0cbe6

Comment by Githook User [ 04/Mar/20 ]

Author:

{'name': 'Eric Milkie', 'username': 'milkie', 'email': 'milkie@10gen.com'}

Message: SERVER-46609 use .find instead of operator[] in _abortDatabaseIndexBuilds
Branch: master
https://github.com/mongodb/mongo/commit/9b7286dfc6d13c4befa684876902ec0c59336afd

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