[SERVER-42617] Race in CloneDocumentsCatchesInsertErrors can causes it to return an unexpected error Created: 02/Aug/19  Updated: 29/Oct/23  Resolved: 14/Feb/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.2.4, 4.3.4

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day, test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0
Sprint: Sharding 2019-12-30, Sharding 2020-01-13, Sharding 2020-01-27, Sharding 2020-02-10, Sharding 2020-02-24
Participants:
Linked BF Score: 3

 Description   

When the inserter thread closes the consumer end (because of intentional error by test) while the producer tries to push.

To reproduce more easily, simply add a sleepsecs(1) right before this line:

https://github.com/mongodb/mongo/blob/e6ef0ca20e99b2b3a6682952c2588e6e2d1ba8a9/src/mongo/db/s/migration_destination_manager.cpp#L418



 Comments   
Comment by Githook User [ 17/Feb/20 ]

Author:

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

Message: SERVER-42617 Race in CloneDocumentsCatchesInsertErrors can causes it to return an unexpected error

When the batch insertion routine on the consumer thread fails,
ensure that we return the proper error instead of
ErrorCodes::ProducerConsumerQueueEndClosed.

(cherry picked from commit 957041ffb72ecca2880398312ab8a98669e16322)
Branch: v4.2
https://github.com/mongodb/mongo/commit/d071cb84a096c87498a3f73f5043b64b51d649d9

Comment by Githook User [ 14/Feb/20 ]

Author:

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

Message: SERVER-42617 Race in CloneDocumentsCatchesInsertErrors can causes it to return an unexpected error

When the batch insertion routine on the consumer thread fails,
ensure that we return the proper error instead of
ErrorCodes::ProducerConsumerQueueEndClosed.
Branch: master
https://github.com/mongodb/mongo/commit/876b3af1091b299884869c34a41f7f37d4dcc0bb

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