[SERVER-34896] Using index builder on primaries does not timestamp index build completion Created: 08/May/18  Updated: 29/Oct/23  Resolved: 14/May/18

Status: Closed
Project: Core Server
Component/s: Replication, Storage
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-39085 move secondary oplog application logi... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-05-21
Participants:
Linked BF Score: 76

 Description   

Typically indexes on primaries are built via a user command. However there are a few instances where index builds can complete on a node that identifies as a primary, but managed by the IndexBuilder class. Specifically:

  • Primary catchup
  • Primary drain
  • Started on a secondary, but complete after a step-up

Primaries (and other states) do not timestamp index completion. For primaries, it was expected that committing the index build writes an oplog entry, timestamping the transaction.

Instead, consider having callers of MultiIndexBlock manage timestamping the write.



 Comments   
Comment by Githook User [ 14/May/18 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-34896: Move timestamping responsibility on index completion to callers.

Previously, `MultiIndexBlockImpl` would use member state as a proxy for whether
an index build originated from a `createIndexes` command. This information was
used to determine if the completion of the index needed to be explicitly
timestamped, or whether an oplog entry would timestamp the write.

However, nodes in a primary state can build indexes during primary "catch-up"
or "drain". Those index builds originated from an oplog entry and thus will not
generate one on completion. These index builds need to be explicitly
timestamped.
Branch: master
https://github.com/mongodb/mongo/commit/8e27c2b49ba17fe9b02695efb29a6322b56c2f23

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