[DOCS-12094] Update documentation for commands with specific output formats on sharded cluster Created: 28/Sep/18  Updated: 30/Oct/23

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

Type: Task Priority: Major - P3
Reporter: Derick Rethans Assignee: Ravind Kumar (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-36786 mongod and mongos result format for c... Closed
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769
Story Points: 0.5

 Description   

Original Description

The documentation at https://docs.mongodb.com/manual/reference/command/collMod/#change-expiration-value-for-indexes shows the result document as:

{ "expireAfterSeconds_old" : 1800, "expireAfterSeconds_new" : 3600, "ok" : 1 }

We expect this format for the https://docs.mongodb.com/php-library/master/reference/method/MongoDBDatabase-modifyCollection/ method. However, we are adding additional topologies for our tests, and noticed that with a sharded cluster, the output format changes to:

{
	"raw" : {
		"localhost:4100" : {
			"ok" : 0,
			"errmsg" : "ns does not exist",
			"code" : 26,
			"codeName" : "NamespaceNotFound"
		},
		"localhost:4200" : {
			"expireAfterSeconds_old" : NumberLong(500),
			"expireAfterSeconds_new" : 700,
			"ok" : 1
		}
 
	},
	"ok" : 1,
	"operationTime" : Timestamp(1534859095, 4),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1534859095, 4),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	}
}

Could you please document this difference?

Documentation Summary

Based on this comment, update any command that uses the appendRawResponses helper to include a Behavior section that discusses the output format when executed on a mongos

Scope of changes

For 4.2 docs, update the following commands with the behavior section as noted above:

  • abortTransaction
  • collMod
  • createIndexes
  • dbStats
  • dropIndexes

For 4.0 docs, update the following commands with the behavior section as noted above:

  • abortTransaction
  • collMod
  • createIndexes
  • dbStats
  • dropIndexes
  • reIndex

For 3.6 docs, update the following commands with the behavior section as noted above:

  • collMod
  • createIndexes
  • dbStats
  • dropIndexes
  • reIndex


 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Comment by Ravind Kumar (Inactive) [ 28/Sep/18 ]

ToDo: Test collmod options against a sharded cluster and validate output changes. Check w/ server team as to when exactly these changes occured.

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