[SERVER-54362] Cannot assume the batch has been inserted when using failpoint tenantMigrationHangCollectionClonerAfterHandlingBatchResponse Created: 05/Feb/21  Updated: 29/Oct/23  Resolved: 07/Feb/21

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

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: pm-1791_non-cloud-blocking
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2021-02-22
Participants:
Linked BF Score: 13

 Description   

In test tenant_migration_resume_collection_cloner_after_rename.js, we use the failpoint tenantMigrationHangCollectionClonerAfterHandlingBatchResponse and assume that the documents cloned are inserted when the failpoint is hit. This may not be the case. This is because in the collection cloner, insertDocumentsCallback is called on a different thread. And hitting the failpoint tenantMigrationHangCollectionClonerAfterHandlingBatchResponse doesn't necessarily mean the insertDocumentsCallback has finished executing.

So I think we need to change the jsTest to use assert.soon when checking the number of documents cloned.



 Comments   
Comment by Githook User [ 06/Feb/21 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-54362: Cannot assume the batch has been inserted when using failpoint tenantMigrationHangCollectionClonerAfterHandlingBatchResponse
Branch: master
https://github.com/mongodb/mongo/commit/1598de55e0a96db575a3945e05cbb392620d1af4

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