[SERVER-74210] Cancelled index builds due to secondary signal have generic error message Created: 21/Feb/23  Updated: 29/Oct/23  Resolved: 12/May/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: Yujin Kang Park Assignee: Josef Ahmad
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-74979 Return underlying error to user when ... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-04-03, Execution Team 2023-04-17, Execution Team 2023-05-01, Execution Team 2023-05-15
Participants:

 Description   

The user command is waiting on the thread, and a secondary aborting an index build causes the abort reason to be set as operation interrupted on the primary, because the opCtx running the build is killed. The 'voteAbortIndexBuild' command includes the error msg, which is also replicated in the 'abortIndexBuild' oplog entry. The user command should also receive a more informative error message.

{
[js_test:index_secondary_signal_primary_abort] sh17320| 	"ok" : 0,
[js_test:index_secondary_signal_primary_abort] sh17320| 	"errmsg" : "Index build failed: 721d0b99-d62f-4c30-be23-b6422d5459a8: Collection test.test ( 1d40c7b5-2863-4a59-b4db-9204005bbec2 ) :: caused by :: operation was interrupted",
[js_test:index_secondary_signal_primary_abort] sh17320| 	"code" : 276,
[js_test:index_secondary_signal_primary_abort] sh17320| 	"codeName" : "IndexBuildAborted",
[js_test:index_secondary_signal_primary_abort] sh17320| 	"$clusterTime" : {
[js_test:index_secondary_signal_primary_abort] sh17320| 		"clusterTime" : Timestamp(1676990007, 1),
[js_test:index_secondary_signal_primary_abort] sh17320| 		"signature" : {
[js_test:index_secondary_signal_primary_abort] sh17320| 			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
[js_test:index_secondary_signal_primary_abort] sh17320| 			"keyId" : NumberLong(0)
[js_test:index_secondary_signal_primary_abort] sh17320| 		}
[js_test:index_secondary_signal_primary_abort] sh17320| 	},
[js_test:index_secondary_signal_primary_abort] sh17320| 	"operationTime" : Timestamp(1676990006, 4)
[js_test:index_secondary_signal_primary_abort] sh17320| }



 Comments   
Comment by Githook User [ 11/May/23 ]

Author:

{'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}

Message: SERVER-74210 Improve createIndexes errmsg on secondary abort
Branch: master
https://github.com/mongodb/mongo/commit/d4fd4604a6f857504d7b6bf37478b5ac06a99d4c

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