[SERVER-36140] Add featureCompatibilityVersion status to serverStatus response Created: 16/Jul/18  Updated: 06/Sep/23  Resolved: 06/Sep/23

Status: Closed
Project: Core Server
Component/s: Shell, Upgrade/Downgrade
Affects Version/s: 4.0.0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Tim Hawkins Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Duplicate Votes: 1
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-58534 Collect FCV in FTDC Closed
Related
is related to SERVER-58534 Collect FCV in FTDC Closed
Assigned Teams:
Sharding EMEA
Participants:
Story Points: 2

 Description   

It would be useful to add the current value of featureCompatibilityVersion to the serverStatus response, not only does it eliminate the need to remember the command to display the value, (which is a mouthful), but it can be used by tools when displaying server properties. 



 Comments   
Comment by Sean Zimmerman [ 06/Sep/23 ]

Good find, yes SERVER-58534 adds FCV into server status so this is a duplicate

Comment by Judah Schvimer [ 06/Sep/23 ]

sean.zimmerman@mongodb.com, is this a duplicate of SERVER-58534?

Comment by Asya Kamsky [ 07/Sep/18 ]

The shell `db.version()` also could use this info but it uses `"buildinfo"` command which also should include this I suppose.

Comment by Ramon Fernandez Marina [ 16/Jul/18 ]

Thanks for your report thawkins. Please note that you can configure your shell to create a shortcut to display this information.

For example, if you add the following to your ~/.mongorc.js:

function fcv() {
    printjson(db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } ));
}

then you can do:

replset:PRIMARY> fcv()
{
        "featureCompatibilityVersion" : {
                "version" : "4.0"
        },
        "ok" : 1,
        "operationTime" : Timestamp(1531758743, 1),
        "$clusterTime" : {
                "clusterTime" : Timestamp(1531758743, 1),
                "signature" : {
                        "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                        "keyId" : NumberLong(0)
                }
        }
}

Regards,
Ramón.

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