[SERVER-44393] indexu.js fails in replica_set_passthrough when two phase index builds are enabled Created: 04/Nov/19  Updated: 29/Oct/23  Resolved: 11/Nov/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
depends on SERVER-2902 Index keys are not generated for nume... Closed
depends on SERVER-2598 Curious indexing behavior with arrays Closed
depends on SERVER-9163 Add btree access method, move BtreeCu... Closed
depends on SERVER-8791 Create a uniform index API across all... Closed
is depended on by SERVER-43692 enable two phase index builds by default Closed
Related
related to SERVER-44544 IndexBuildsCoordinator::_buildIndexTw... Closed
is related to SERVER-39428 Record all indexing errors during sim... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2019-11-18
Participants:
Linked BF Score: 145

 Description   

When the test jstests/core/indexu.js is run in a passthrough suites that uses replica sets, such as replica_sets_jscore_passthrough, the secondary node will crash with a 51101 fassert code. The cause of the fatal assertion is an index build failure from btree_key_generator.cpp with the error code 16746. This happens when two phase index builds are enabled.

 

This can be reproduced with the following command line:

 
buildscripts/resmoke.py --mongodSetParameters='{enableTwoPhaseIndexBuild: true}' --suites=replica_sets_jscore_passthrough jstests/core/indexu.js 



 Comments   
Comment by Githook User [ 09/Nov/19 ]

Author:

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

Message: SERVER-44393 two phase index build crashes on commitIndexBuild while waiting for abort due to prior indexing errors
Branch: master
https://github.com/mongodb/mongo/commit/a5b55ef3f97e3fef647d9b17ef3109144bdf8477

Comment by Githook User [ 09/Nov/19 ]

Author:

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

Message: SERVER-44393 add js test to ensure secondary aborts if it gets a commitIndexBuild oplog entry after failing to insert the sorted keys
Branch: master
https://github.com/mongodb/mongo/commit/6096c0e308c8ccc98c61636f924ffed4689efd12

Comment by Githook User [ 09/Nov/19 ]

Author:

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

Message: SERVER-44393 IndexBuildsCoordinator::_buildIndexTwoPhase() saves indexing error from first two phases on secondary and waits for abort
Branch: master
https://github.com/mongodb/mongo/commit/429174a925a476806a19a1c3cb8533ac2d513347

Comment by Githook User [ 08/Nov/19 ]

Author:

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

Message: SERVER-44393 add js test for a secondary index build that waits for abort from the primary after a 16746 error

Index spec and test data is based on jstests/core/indexu.js
Branch: master
https://github.com/mongodb/mongo/commit/34cc781e42eabe52c409ad930e87ed785c0db9d5

Comment by Githook User [ 08/Nov/19 ]

Author:

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

Message: SERVER-44393 split IndexBuildsCoordinator::_buildIndex() by index build protocol (single or two phase)
Branch: master
https://github.com/mongodb/mongo/commit/8d02d5b95fd198e685cb5009e1613730379d5e0c

Comment by Githook User [ 08/Nov/19 ]

Author:

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

Message: SERVER-44393 split IndexBuildsCoordinator::_buildIndex() into hybrid index build phases
Branch: master
https://github.com/mongodb/mongo/commit/02cef2152d32e04f6f8149dd7923f977b417ffb2

Comment by Benety Goh [ 06/Nov/19 ]

indexu.js was added to highlight potentially ambiguous indexing behavior described in SERVER-2902 and SERVER-2598. The error code 16746 was introduced in SERVER-9163 and SERVER-8791 during the query system rewrite in 2013.

Comment by Benety Goh [ 04/Nov/19 ]

I had a theory that SERVER-39428 may address this issue but this is an index build error that is not specific to unique indexes.

Generated at Thu Feb 08 05:05:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.