[SERVER-86100] Fix order of dependent variable assignments in currentop_shell.js Created: 01/Feb/24  Updated: 06/Feb/24  Resolved: 06/Feb/24

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

Type: Bug Priority: Major - P3
Reporter: Adi Zaimi Assignee: Adi Zaimi
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Fix
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 43

 Description   

Test has two variable definitions which are interdependent and in the wrong order:

        const chunksInfo =
            coll.getDB().getSiblingDB("config").chunks.find({uuid: collInfo.uuid}).toArray();
        const collInfo =
            coll.getDB().getSiblingDB("config").collections.findOne({_id: coll.getFullName()});

The first one depends on collInfo which is not defined yet. The order of the two stmts needs to be swapped.



 Comments   
Comment by Githook User [ 02/Feb/24 ]

Author:

{'name': 'Adi Zaimi', 'email': 'adizaimi@yahoo.com', 'username': 'adizaimi'}

Message: SERVER-86100: Fix order of dependent variable assignments in currentop_shell.js (#18638)

GitOrigin-RevId: c1a1e5a173767ca8dd1b7481a4aeb989ed5738d8
Branch: master
https://github.com/mongodb/mongo/commit/f6bc42d7fa1f5f3d0035e9078a297f19a64534ce

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