[SERVER-70381] _internalSearchIdLookup stage violates a 5.0 precondition of the getOwnershipFilter function Created: 10/Oct/22  Updated: 29/Oct/23  Resolved: 26/Oct/22

Status: Closed
Project: Core Server
Component/s: Query Execution
Affects Version/s: None
Fix Version/s: 6.1.1, 5.0.14, 6.0.3, 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Sergi Mateo Bellido
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-52764 Reenable invariant that `getOwnership... Closed
Related
related to SERVER-70515 getShardFilterer utility doesn't fulf... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.1, v6.0, v5.0
Sprint: Sharding EMEA 2022-10-17, Sharding EMEA 2022-10-31
Participants:

 Description   

The Sharding getOwnershipFilter 5.0 API requires the OperationShardingState to be versioned, otherwise it invariants. SERVER-52764 is the ticket that added back the invariant and in its description we were aware that we had to fix a usage in _internalSearchIdLookup stage, however we never did it (probably we thought that everything was fine because in a 5.0 deployment by default we didn't hit that invariant?).

In order to hit the invariant you have to set the read concern as available.



 Comments   
Comment by Githook User [ 08/Nov/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Fixing Sharding API usage
Branch: v5.0
https://github.com/mongodb/mongo/commit/d85c4a5b97b52e1bc87554fa43ffcb7fd61e0c63

Comment by Garaudy Etienne [ 08/Nov/22 ]

sergi.mateo-bellido@mongodb.com this means it will make 5.0.14, correct?

Comment by Githook User [ 30/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Creating auxiliary library with the ShardFilterer

(cherry picked from commit 83db85a8e224faf3e3bb36c610e9b35669429dfe)
Branch: v6.0
https://github.com/mongodb/mongo/commit/5fcda91f30f5bc8c0bc77cc2f18f645bb3d9d298

Comment by Githook User [ 30/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Fixing CollectionShardingState API usage

Just fixing a comment, keeping this commit to know that everything was
backported

(cherry picked from commit 58f8772bc2d5fa26f0ade238a0fe1155c55aa2dc)
Branch: v6.0
https://github.com/10gen/mongo-enterprise-modules/commit/895bfea2a37a8d4fc0b7624a5ff5586cad4d949b

Comment by Githook User [ 30/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Fixing when the ShardFilterer is built

Do not build it if the operation is not versioned.

(cherry picked from commit f337ba91dcae854e7c090ab2cdb2e4b1c390684a)
Branch: v6.0
https://github.com/10gen/mongo-enterprise-modules/commit/b2de8f022d4e1fcfb3b4a3b5a1c4d21712960a1f

Comment by Githook User [ 28/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Creating auxiliary library with the ShardFilterer

(cherry picked from commit 83db85a8e224faf3e3bb36c610e9b35669429dfe)
Branch: v6.1
https://github.com/mongodb/mongo/commit/8ad69f82f6b88b5f82c79ce15874f17a670c4dc9

Comment by Githook User [ 28/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Fixing CollectionShardingState API usage

Just fixing a comment, keeping this commit for consistence

(cherry picked from commit 58f8772bc2d5fa26f0ade238a0fe1155c55aa2dc)
Branch: v6.1
https://github.com/10gen/mongo-enterprise-modules/commit/9fbec4d96e68a0364ab931715b6e0a7acc063270

Comment by Githook User [ 28/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Fixing when the ShardFilterer is built

Do not build it if the operation is not versioned.

(cherry picked from commit f337ba91dcae854e7c090ab2cdb2e4b1c390684a)
Branch: v6.1
https://github.com/10gen/mongo-enterprise-modules/commit/2d9587ec95b6909b112f3338b3827f75daf029ab

Comment by Githook User [ 26/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Creating auxiliary library with the ShardFilterer
Branch: master
https://github.com/mongodb/mongo/commit/83db85a8e224faf3e3bb36c610e9b35669429dfe

Comment by Githook User [ 26/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Fixing CollectionShardingState API usage
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/58f8772bc2d5fa26f0ade238a0fe1155c55aa2dc

Comment by Githook User [ 26/Oct/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-70381 Fixing when the ShardFilterer is built

Do not build it if the operation is not versioned.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/f337ba91dcae854e7c090ab2cdb2e4b1c390684a

Comment by Kyle Suarez [ 10/Oct/22 ]

Sending this to Query Optimization as they own $idLookup. CC ted.tuckman@mongodb.com

Comment by Sergi Mateo Bellido [ 10/Oct/22 ]

Neither the 6.0 nor the master version of _internalSearchIdLookup seem to use the ShardFilterer. Perhaps this is just a problem on 5.0?

Comment by Sergi Mateo Bellido [ 10/Oct/22 ]

Passing this ticket to the query-execution team since I believe they own the _internalSearchIdLookup stage. Feel free to reach me for more context and/or add me to the PR review.

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