[DOCS-13315] Investigate changes in SERVER-39596: While a node is not in primary/secondary state, dbStats/collStats should not hang Created: 20/Dec/19  Updated: 30/Oct/23  Due: 19/Jun/20  Resolved: 24/Jun/20

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-39596 While a node is not in primary/second... Closed
Participants:
Days since reply: 3 years, 33 weeks ago
Epic Link: DOCS: 4.4 Server Release Work

 Description   

Description

Downstream Change Summary

The 'dbStats' and 'collStats' commands no longer hang during the initial sync of a node.

Description of Linked Ticket

Currently when a node is in initial sync (STARTUP2), running a query on a collection (except collections in local database) returns error "NotMasterOrSecondary":

> db.docs.find()
Error: error: {
    "operationTime" : Timestamp(0, 0),
    "ok" : 0,
    "errmsg" : "node is not in primary or recovering state",
    "code" : 13436,
    "codeName" : "NotMasterOrSecondary",
    "$clusterTime" : {
        "clusterTime" : Timestamp(1550198882, 1),
        "signature" : {
            "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
            "keyId" : NumberLong(0)
        }
    }
}

However, when we run the dbStats or collStats commands (on the collection that is syncing), the commands will just hang there, waiting for locks. Since the node is in STARTUP2 state (not ready for reads), will we consider just returning an error "NotMasterOrSecondary" for dbStats/collStats/listDatabases/etc commands (same as the {find}} command)?

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 24/Jun/20 ]

Author:

{'name': 'Kay Kim', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-13315: 4.4 init sync operations restrictions
Branch: master
https://github.com/mongodb/docs/commit/d8ec51dabed7ab06562cc0475c28a91eaabf1916

Generated at Thu Feb 08 08:07:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.