[SERVER-50545] Retry on ConflictingOperationInProgress in index_operations_abort_concurrent_outgoing_migrations.js Created: 26/Aug/20  Updated: 29/Oct/23  Resolved: 04/Sep/20

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

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
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.4
Sprint: Sharding 2020-09-07
Participants:
Linked BF Score: 39

 Description   

jstests/sharding/index_operations_abort_concurrent_outgoing_migrations.js runs a migration after an earlier one with the same donor and recipient is aborted because of an index operation, which is susceptible to failing with ConflictingOperationInProgress if the following sequence occurs:

  • Migration m1 begins from shard0 to shard1
  • m1 is interrupted when an index build applies on shard0
  • Shard0 returns an error to the client immediately without notifying shard1 of the failure (shard1 will eventually discover the migration aborted when it contacts shard0 as part of the recipient protocol)
  • The test begins another migration m2 from shard0 to shard1
  • m2 fails because shard0 is unable to begin a migration on shard1 because shard1 has yet to discover m1 failed (a shard can only receive one chunk at a time)
  • Shard0 returns ConflictingOperationInProgress

Eventually the recipient shard should clean up state from the failed migration and allow new migrations involving it to succeed, so to handle this, the test should retry its migrations on ConflictingOperationInProgress.



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

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-50545 Retry on ConflictingOperationInProgress in index_operations_abort_concurrent_outgoing_migrations.js

(cherry picked from commit 49153d63a1a19c8dbbd186a8542609b2e7f41d13)
Branch: v4.4
https://github.com/mongodb/mongo/commit/16038da420f6e68c0701df7665796fd99144e95f

Comment by Jack Mulrow [ 04/Sep/20 ]

The changes from SERVER-48641 to make migration recipients yield the migration session are what caused this BF and have been backported to 4.4, so requesting a 4.4 backport for this ticket as well.

Comment by Githook User [ 04/Sep/20 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-50545 Retry on ConflictingOperationInProgress in index_operations_abort_concurrent_outgoing_migrations.js
Branch: master
https://github.com/mongodb/mongo/commit/49153d63a1a19c8dbbd186a8542609b2e7f41d13

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