[SERVER-81033] Ignore the `collMod` response from the DBPrimary shard if it has no chunks Created: 13/Sep/23  Updated: 16/Nov/23  Resolved: 19/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.2.0-rc0
Fix Version/s: 7.2.0-rc0, 7.0.3, 6.0.12

Type: Bug Priority: Major - P3
Reporter: Silvia Surroca Assignee: Pol Pinol
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-80134 Allow CollMod to work when an unshard... Closed
Problem/Incident
is caused by SERVER-71819 Broadcast collMod command to all shards Closed
Related
is related to SERVER-62310 collMod command not sent to all shard... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0
Sprint: Sharding EMEA 2023-09-18, Sharding EMEA 2023-10-02
Participants:
Story Points: 3

 Description   

Collmod is designed to be propagated to all the shards owning chunks and to the DBPrimary shard (that's because we need to keep a copy of the collection metadata on the DBPrimary for design purposes).

However, the createIndex command is only targeting all the shards owning chunks, skipping the DBPrimary if it doesn't own any chunks.

So, if a collmod is called over an index that is not present on the DBPrimary, it will fail with a NoIndexFound error.



 Comments   
Comment by Githook User [ 17/Oct/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-71819 Broadcast collMod command to all shards

(cherry picked from commit eec54ec63e557e18f0e8361335b9a39887572b4d)

SERVER-81033 Ignore the `collMod` response from the db primary shard if it has no chunks

(cherry picked from commit 76ef13cd2ef0798606f8387a088a1edff1093d9a)
Branch: v7.1
https://github.com/mongodb/mongo/commit/a332192a120fd0f482ad7c5e6be4fe331b3c38e1

Comment by Githook User [ 04/Oct/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-71819 Broadcast collMod command to all shards

(cherry picked from commit eec54ec63e557e18f0e8361335b9a39887572b4d)

SERVER-81033 Ignore the `collMod` response from the db primary shard if it has no chunks

(cherry picked from commit 76ef13cd2ef0798606f8387a088a1edff1093d9a)
Branch: v6.0
https://github.com/mongodb/mongo/commit/b707967712ee3fd3cae5431f736e91f665b0133a

Comment by Githook User [ 04/Oct/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-71819 Broadcast collMod command to all shards

(cherry picked from commit eec54ec63e557e18f0e8361335b9a39887572b4d)

SERVER-81033 Ignore the `collMod` response from the db primary shard if it has no chunks

(cherry picked from commit 76ef13cd2ef0798606f8387a088a1edff1093d9a)
Branch: v7.0
https://github.com/mongodb/mongo/commit/6b4286cab30323314e68773755ac47086136d1d5

Comment by Githook User [ 19/Sep/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-81033 Ignore the `collMod` response from the db primary shard if it has no chunks
Branch: master
https://github.com/mongodb/mongo/commit/76ef13cd2ef0798606f8387a088a1edff1093d9a

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