[SERVER-73877] Wait for shard to have a primary before doing a migration in prepare_transaction_then_migrate.js Created: 10/Feb/23  Updated: 29/Oct/23  Resolved: 11/Apr/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 7.0.0-rc0, 6.0.5, 4.4.20, 5.0.16, 6.3.0-rc3
Fix Version/s: 7.0.0-rc0, 7.1.0-rc0, 6.0.6, 5.0.17, 4.4.21, 6.3.1

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Silvia Surroca
Resolution: Fixed Votes: 0
Labels: sharding-nyc-test-improvements
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-74177 balancer_commands_scheduler wraps ret... Closed
Assigned Teams:
Sharding NYC
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.3, v6.0, v5.0, v4.4
Sprint: Sharding EMEA 2023-04-17
Participants:
Linked BF Score: 26

 Description   

In the prepare_transaction_then_migrate.js test there is a stepUp and then a migration in a parallel shell which is expected to hang in a point in the migration. However, if the source shard is still executing the step up process then the migration will fail with a NotWritablePrimary error, causing the test to time out waiting for a migration to get into a point that will never reach.

We could either retry the moveChunk command or find a way to wait for the primary to reach a steady state.



 Comments   
Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-73877 Wait for shard to have a primary before doing a migration in prepare_transaction_then_migrate.js

(cherry picked from commit b7b9d352b9566fe8b4c66eff66f695932b036f54)
Branch: v6.3
https://github.com/mongodb/mongo/commit/4bd5f34f0274d8d8732cb827b7126c5bbb0424f0

Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-73877 Wait for shard to have a primary before doing a migration in prepare_transaction_then_migrate.js

(cherry picked from commit b7b9d352b9566fe8b4c66eff66f695932b036f54)
Branch: v7.0
https://github.com/mongodb/mongo/commit/31eee5f26b9a340606a05d395b61b353b773d7d8

Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-73877 Wait for shard to have a primary before doing a migration in prepare_transaction_then_migrate.js

(cherry picked from commit b7b9d352b9566fe8b4c66eff66f695932b036f54)
Branch: v6.0
https://github.com/mongodb/mongo/commit/604c5790b0d20ecdb54778c08accd94476a314ca

Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-73877 Wait for shard to have a primary before doing a migration in prepare_transaction_then_migrate.js

(cherry picked from commit b7b9d352b9566fe8b4c66eff66f695932b036f54)
Branch: v5.0
https://github.com/mongodb/mongo/commit/d2652fd6b67f9f6e03cc45b4a00b3a99a804058b

Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-73877 Wait for shard to have a primary before doing a migration in prepare_transaction_then_migrate.js

(cherry picked from commit b7b9d352b9566fe8b4c66eff66f695932b036f54)
Branch: v4.4
https://github.com/mongodb/mongo/commit/d9f1d13eb48cc7d734543093d01d715bdf2af4d3

Comment by Githook User [ 11/Apr/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-73877 Wait for shard to have a primary before doing a migration in prepare_transaction_then_migrate.js
Branch: master
https://github.com/mongodb/mongo/commit/b7b9d352b9566fe8b4c66eff66f695932b036f54

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