[SERVER-10241] collStats command shows info from removed shard Created: 17/Jul/13  Updated: 06/Dec/22  Resolved: 07/Nov/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.5.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File coll_stats.js     File coll_stats_new.js     Text File coll_stats_new_output.txt    
Issue Links:
Depends
Assigned Teams:
Sharding
Operating System: ALL
Participants:

 Description   

The output of the collStats command can show you results from a shard that was already removed.



 Comments   
Comment by Sheeri Cabral (Inactive) [ 07/Nov/19 ]

Tests now make replica sets for shards, so I changed name of shard from shard000X to coll_stats-rsX in the script.

Tests passed, coll_stats_rs0 was successfully removed (as per line 3119), and the collStats command run at line 3197 does not show coll_stats-rs2 output. And explain (run at 3144) still does not show coll_stats-rs2 output. See attached coll_stats_new_output.txt.

Comment by Kaloian Manassiev [ 23/Aug/18 ]

This should have gone away with the changes since 3.2, but it would be good to verify.

Comment by Randolph Tan [ 17/Jul/13 ]

Attached a script that demonstrates the issue. Note that explain output doesn't show the removed shard (as expected).

Generated at Thu Feb 08 03:22:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.