[SERVER-74786] Avoid IndexBuildAborted error code to convey state information Created: 13/Mar/23  Updated: 29/Oct/23  Resolved: 26/Jun/23

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

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Yujin Kang Park
Resolution: Fixed Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Sprint: Execution EMEA Team 2023-06-26, Execution EMEA Team 2023-07-10
Participants:

 Description   

After SERVER-76935 kExternalAborted index build state indicates that the caller is responsible for the abort. Still, there are some left over places where we could remove use of IndexBuildAborted.

https://github.com/10gen/mongo/blob/b32042b0dc2f06a56356eb6a6864394b4af46069/src/mongo/db/index_builds_coordinator_mongod.cpp#L761

https://github.com/10gen/mongo/blob/b32042b0dc2f06a56356eb6a6864394b4af46069/src/mongo/db/index_builds_coordinator.cpp#L3347

Maybe we could even just pass the default Interrupted error code in killOp

https://github.com/10gen/mongo/blob/b32042b0dc2f06a56356eb6a6864394b4af46069/src/mongo/db/repl_index_build_state.cpp#L551


Original description:

We use IndexBuildAborted to signal to the index builder thread that "the caller is taking responsibility for aborting this index build, do not cleanup". Instead, we should use the ReplIndexBuildState we already pass around and store this information on that structure, rather than using a special error code.



 Comments   
Comment by Githook User [ 26/Jun/23 ]

Author:

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

Message: SERVER-74786 Cleanup IndexBuildAborted used to determine index build state
Branch: master
https://github.com/mongodb/mongo/commit/73170a0dcbf93067a857bf6f193874183052d765

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