[SERVER-47524] Update stage: Convert usage of getCollectionDescription_DEPRECATED to getCollectionDescription Created: 14/Apr/20  Updated: 29/Oct/23  Resolved: 29/Apr/20

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

Type: Task Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File shard_existing_coll_chunk_count.js.traces.demangled     Text File update_stage_throws.stacktrace.txt     Text File update_stage_throws.stacktrace2.txt    
Issue Links:
Depends
is depended on by SERVER-47521 Remove getCollectionDescription_DEPRE... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-04-20, Sharding 2020-05-04
Participants:

 Description   

https://github.com/mongodb/mongo/blob/e93a19b0d6c3e7004efd914a5e6dd27bc525c421/src/mongo/db/exec/update_stage.cpp#L179



 Comments   
Comment by Githook User [ 29/Apr/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-47524 Update stage: Convert usage of getCollectionDescription_DEPRECATED to getCollectionDescription
Branch: master
https://github.com/mongodb/mongo/commit/33787deafcc30bb7c8f08e10123fe5d6b3b937b5

Comment by Tommaso Tocci [ 22/Apr/20 ]

Last EVG: https://evergreen.mongodb.com/version/5ea06caf7742ae06edffeb2c

Sharding suite failed, mongos gets a StaleConfig on a establishingCursors()

"User assertion","attr":{"error":"StaleConfig{ ns: \"test.foo\", vReceived: Timestamp(3, 0), vReceivedEpoch: ObjectId('5ea0738e0cea6ef0922210d1'), vWanted: Timestamp(0, 0), vWantedEpoch: ObjectId('5ea0738e0cea6ef0922210d1'), shardId: \"tag_auto_split-rs0\" }: this shard no longer contains chunks for test.foo, the collection may have been dropped","file":"src/mongo/s/query/establish_cursors.cpp","line":94}

The shard is throwing on getMetadataWithVersionCheckAt

Complete log: https://logkeeper.mongodb.org/lobster/build/a771667bda22743e2609a27b2ddac211/test/5ea07388c2ab685b222a0eff#bookmarks=0%2C3552%2C120687&l=3552|

 

Comment by Tommaso Tocci [ 15/Apr/20 ]

When using the new getCollectionDescription function that throws, the attached update_stage_throws.stacktrace.txt shows that in mongo::repl::applyOplogEntryOrGroupedInserts we do a call to mongo::update in a writeConflictRetry. If the update operation throws a staleConfigException, the exception get propagated up to this catch then converted to a status object and bubbled up. We need to find a way to handle the StaleConfigException somewhere in this code path.

Comment by Tommaso Tocci [ 14/Apr/20 ]

last EVG tracking failures https://evergreen.mongodb.com/version/5e95e1933627e055ace4804d

Generated at Thu Feb 08 05:14:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.