Cannot assume the batch has been inserted when using failpoint tenantMigrationHangCollectionClonerAfterHandlingBatchResponse

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Repl 2021-02-22
    • 13
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Lingzhi Deng
            Reporter:
            Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: