[SERVER-25175] listIndexes shouldn't include in-progress background index builds on primary nodes Created: 20/Jul/16  Updated: 06/Dec/22  Resolved: 30/Nov/17

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Replication
Affects Version/s: None
Fix Version/s: 3.4.18, 3.6.9, 3.7.1, 4.0.0

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-39719 Ensure that a node performing an init... Closed
Duplicate
is duplicated by SERVER-34970 Consider indicating that an index bui... Closed
Problem/Incident
causes SERVER-39723 Change listIndexes command behavior t... Closed
Related
related to SERVER-30224 Need completion flag field in db.coll... Closed
related to SERVER-37721 Add a command argument to listIndexes... Closed
related to SERVER-25176 Provide a way to list actively buildi... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6, v3.4
Sprint: Storage 2017-12-04
Participants:
Case:
Linked BF Score: 0

 Description   

Currently listIndexes includes in-progress background indexes that haven't been committed yet. This can theoretically (I haven't tested it) lead to an inconsistency in initial sync in the following scenario:

  1. Start bg index on primary
  2. Start initial sync
  3. Initial sync runs listIndexes and builds all returned indexes
  4. Initial sync finishes with the bg index
  5. Kill the bg index build on primary (or have it fail due to a recent insert)

I think after these steps, the secondary will have an index that the primary doesn't.



 Comments   
Comment by Githook User [ 21/Feb/19 ]

Author:

{'name': 'Eric Milkie', 'username': 'milkie', 'email': 'milkie@10gen.com'}

Message: SERVER-39723 Revert "SERVER-25175 listIndexes command only includes ready indexes"

This reverts commit 1c922de9cac97065fb018f5d049566ecba803433.
Branch: v3.6
https://github.com/mongodb/mongo/commit/2151d1d219bbaff918db0d43fcb812231c20d53a

Comment by Githook User [ 21/Feb/19 ]

Author:

{'name': 'Eric Milkie', 'email': 'milkie@10gen.com', 'username': 'milkie'}

Message: SERVER-39723 Revert "SERVER-25175 listIndexes command only includes ready indexes"

This reverts commit e013b606016ead1c82ed7c09cbe3c558d5aaa3b2.
Branch: v3.4
https://github.com/mongodb/mongo/commit/f69dc2d3637dd1fb8de8d11c2a03289a5c31fceb

Comment by Githook User [ 01/Oct/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-25175 listIndexes command only includes ready indexes

(cherry picked from commit 2cc9396586e771a0484a4017bf3f126098818d2b)
Branch: v3.6
https://github.com/mongodb/mongo/commit/1c922de9cac97065fb018f5d049566ecba803433

Comment by Githook User [ 10/Sep/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-25175 listIndexes command only includes ready indexes

(cherry picked from commit 2cc9396586e771a0484a4017bf3f126098818d2b)
Branch: v3.4
https://github.com/mongodb/mongo/commit/e013b606016ead1c82ed7c09cbe3c558d5aaa3b2

Comment by Githook User [ 30/Nov/17 ]

Author:

{'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-25175 listIndexes command only includes ready indexes
Branch: master
https://github.com/mongodb/mongo/commit/2cc9396586e771a0484a4017bf3f126098818d2b

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