[SERVER-80715] New refine collection shard key might try to access invalid collection object Created: 04/Sep/23  Updated: 29/Oct/23  Resolved: 07/Sep/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.1.0-rc2

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-76486 Make RefineShardKey coordinator autho... Closed
Related
related to SERVER-78997 Recreating a sharded timeseries colle... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1
Sprint: Sharding EMEA 2023-09-18
Participants:
Linked BF Score: 161

 Description   

SERVER-76486 added a new refine collection shard key coordinator that is authoritative in shards, one of the changes include reducing the number of in-memory variables, to simplify how to maintain them synchronized with the persisted state. One of the changes was storing the collection UUID in the coordinator document, this should work for most of the scenarios, however, the interleaving described in SERVER-78997 might generate a situation where the collection object is trying to be accessed when it shouldn't.

We should add an uassert that prevents that access.



 Comments   
Comment by Githook User [ 07/Sep/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key

(cherry picked from commit 8958c7111120f1b1da51bcd9dad479fb347b5d3c)
Branch: v7.1
https://github.com/mongodb/mongo/commit/7a3d81025617995694e6e0bf4169f3ae4578dad8

Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key
Branch: master
https://github.com/mongodb/mongo/commit/8958c7111120f1b1da51bcd9dad479fb347b5d3c

Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: Revert "SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key"

This reverts commit 1a99f32a89e9f98dbdde7f0fb3a64a89cc95fbe3.
Branch: v7.1
https://github.com/mongodb/mongo/commit/d88007ec06276ce5d23a2e478d7ca0aeb3a3604d

Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: Revert "SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key"

This reverts commit 4eefd34335d9ffe76055d5267735bf91bb3d820e.
Branch: master
https://github.com/mongodb/mongo/commit/81b3d3a630c4c865a5230bd4c320fdbc3f65b9e6

Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key

(cherry picked from commit 4eefd34335d9ffe76055d5267735bf91bb3d820e)
Branch: v7.1
https://github.com/mongodb/mongo/commit/1a99f32a89e9f98dbdde7f0fb3a64a89cc95fbe3

Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key
Branch: master
https://github.com/mongodb/mongo/commit/4eefd34335d9ffe76055d5267735bf91bb3d820e

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