[SERVER-38529] remove redundant secondary index checks from indexbg_killop_apply_ops.js Created: 11/Dec/18  Updated: 29/Oct/23  Resolved: 28/Dec/18

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

Type: Bug Priority: Minor - P4
Reporter: Benety Goh Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-12-31
Participants:
Linked BF Score: 0

 Description   

indexbg_killop_apply_ops.js queries the index catalog on the secondary after RepSetTest.awaitReplication(). Due to the asynchronous nature of background index builds on secondary builds, this is not sufficient to ensure that the index has completed.

ReplSetTest.stopSet() has logic to wait for background indexes to complete and to detect if the collection on the secondary has different number of indexes from the primary:

https://github.com/mongodb/mongo/blob/7b1e64f12e855d979232ef7b185002d5c8103353/src/mongo/shell/replsettest.js#L1651

The test assertions at the end of indexbg_killop_apply_ops.js are not necessary given the checks in ReplSetTest.stopSet().



 Comments   
Comment by Githook User [ 28/Dec/18 ]

Author:

{'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek'}

Message: SERVER-38529 remove redundant secondary index checks from indexbg_killop_apply_ops.js
Branch: master
https://github.com/mongodb/mongo/commit/ca09b1f4fd2266e27ad384ac589243324ccdb67c

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