[SERVER-79150] Reduce ScopedSetShardRole scope to setup stage of index build Created: 20/Jul/23  Updated: 29/Jan/24  Resolved: 31/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.6

Type: Bug Priority: Major - P3
Reporter: Yujin Kang Park Assignee: Yujin Kang Park
Resolution: Fixed Votes: 0
Labels: auto-reverted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-78662 Deadlock with index build, step down,... Closed
Problem/Incident
Related
is related to SERVER-69530 Skip sharding DB check during index b... Closed
is related to SERVER-69794 Investigate support for excluding sha... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0
Sprint: Execution EMEA Team 2023-07-24, Execution EMEA Team 2023-08-07
Participants:
Linked BF Score: 150

 Description   

Currently ScopedSetShardRole which sets the shard version is scoped to affect the whole index build thread. This should not be necessary, and has caused issues in the past (SERVER-69530).

The shard version protocol is only required when setting up the index build and writing the 'startIndexBuild' oplog entry. If a chunk migration is in-progress while an index build is started, it will be aborted. A recipient shard will copy in-progress indexes from the donor shard, and if the index build is aborted on the donor, the client running createIndexes will receive an error requiring them to retry the command, and the indexes will become consistent.



 Comments   
Comment by Githook User [ 29/Jan/24 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-79150 Reduce ScopedSetShardRole scope to index build setup

(cherry picked from commit 9e6c0cd6c9bd2fdd911f75401692c385dcd82d34)

GitOrigin-RevId: 58a51e683d758ed2744659cd37f073a3ba5f9e77
Branch: v7.0
https://github.com/mongodb/mongo/commit/2a4910489ff235e63b862099d5ceadc11f69bd08

Comment by Githook User [ 28/Jul/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-79150 Reduce ScopedSetShardRole scope to index build setup
Branch: master
https://github.com/mongodb/mongo/commit/9e6c0cd6c9bd2fdd911f75401692c385dcd82d34

Comment by xgen-buildbaron-user [ 28/Jul/23 ]

Ticket re-opened due to revert. noPassthrough began a consistent failure of jstests/noPassthrough/resumable_index_build_drain_writes_phase_primary.js

Comment by Githook User [ 28/Jul/23 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-79150 Reduce ScopedSetShardRole scope to index build setup"

This reverts commit dd7f5999cdbcbe85211889e060f884cffad92acb.
Branch: master
https://github.com/mongodb/mongo/commit/01f4ff4366a8bb1cdaf73ecba83442b539d53de6

Comment by Githook User [ 27/Jul/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-79150 Reduce ScopedSetShardRole scope to index build setup
Branch: master
https://github.com/mongodb/mongo/commit/dd7f5999cdbcbe85211889e060f884cffad92acb

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