[SERVER-42154] change_streams_primary_shard_unaware.js fails when IndexBuildsCoordinator is enabled Created: 11/Jul/19  Updated: 29/Oct/23  Resolved: 12/Jul/19

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

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-39454 Move createIndexes command fully onto... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2019-07-15
Participants:
Linked BF Score: 17

 Description   

When the IndexBuildsCoordinator is enabled for the createIndexes command on the primary, running the change_streams_primary_shard_unaware.js in the sharding suite fails eventually. This seems to be related to the test stepping down the primary as the createIndexes command is delegating the remaining work for the index build to the IndexBuildsCoordinator's thread pool.



 Comments   
Comment by Githook User [ 12/Jul/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-42154 add sharding to alternate createIndexes implementation builder
Branch: master
https://github.com/mongodb/mongo/commit/e42ecd228cd8167a5ff4b5f52bec4b4b0504dfd7

Comment by Githook User [ 12/Jul/19 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-42154 IndexBuildsCoordinator uses repl state info provided by caller

This affects index builds managed by the IndexBuildsCoordinator on primaries and mitigates
changes in the replication state observed since the start of the index build that may affect
how the index build handles interruptions and errors.
Branch: master
https://github.com/mongodb/mongo/commit/0009dffe8fff9dc14b9cb31ce11851d916c2484a

Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-42154 provide replication state info to index builds during secondary oplog application

Adds a replSetAndNotPrimary field to IndexBuildsCoordinator::IndexBuildOptions
IndexBuildsCoordinator::_runIndexBuild() and _runIndexBuildInner() accept IndexBuildOptions,
which contains the replication state info.
Branch: master
https://github.com/mongodb/mongo/commit/9ae337bd27f7a513df548256400596a6eba4d7a3

Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-42154 add js test to step down before index build begins collection scan
Branch: master
https://github.com/mongodb/mongo/commit/96f983169f2217dea3336f45df6bd59aef3a0714

Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-42154 add hangAfterInitializingIndexBuild fail point to IndexBuildsCoordinatorMongod

This fail point supports index build tests that step down/get interrupted as the createIndexes
command and transferring control over to the IndexBuildsCoordinatorMongod's thread pool.
Branch: master
https://github.com/mongodb/mongo/commit/1719255a297343227cd9a190a3280fb8fef2c488

Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-42154 abort index builds on NotMaster errors when using IndexBuildsCoordinator
Branch: master
https://github.com/mongodb/mongo/commit/33fc66e686b4a48dc9527930c948f137d7628c14

Generated at Thu Feb 08 04:59:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.