[SERVER-34142] Background index builds for RTT on startup replication recovery corrupt _mdb_catalog Created: 27/Mar/18  Updated: 29/Oct/23  Resolved: 06/Apr/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.7.4
Fix Version/s: 3.7.4

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

Issue Links:
Depends
Duplicate
is duplicated by SERVER-30939 Multiple index builds on same collect... Closed
Related
related to SERVER-30939 Multiple index builds on same collect... Closed
is related to SERVER-43097 Improve log messaging when index buil... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-04-09
Participants:
Linked BF Score: 21

 Description   

The LogicalClock is not initialized when performing replication recovery at startup. Completing a background secondary[1] index must set a legal timestamp. However the predicate to assign a timestamp fails because `startup` is not guaranteed to have a valid logical clock state.

[1] It's perhaps unclear why I call the index build a background secondary index build. The index build is kicked off by an oplog entry and as such intersects much of the same code path as a typical secondary index build.



 Comments   
Comment by Githook User [ 09/Apr/18 ]

Author:

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

Message: SERVER-34142: Correct which storage engines timestamp_index_builds.js runs on.
Branch: master
https://github.com/mongodb/mongo/commit/715494c4b02a275ccc526119648b6ac0cebbcb76

Comment by Githook User [ 06/Apr/18 ]

Author:

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

Message: SERVER-34142: Fix fassert code
Branch: master
https://github.com/mongodb/mongo/commit/73cf755e6e4cf5e0e3f43e0d98954c583ed00060

Comment by Githook User [ 06/Apr/18 ]

Author:

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

Message: SERVER-34142: Convert background index builds to foreground during oplog recovery.
Branch: master
https://github.com/mongodb/mongo/commit/a273f6f84cb29e31221f580b00905613d3f31330

Comment by Daniel Gottlieb (Inactive) [ 27/Mar/18 ]

It is important in this case that it's background yes. What I thought would be confusing to some was whether playing an oplog entry during replication recovery at startup would be considered a "secondary" index build or not.

Comment by Kyle Suarez [ 27/Mar/18 ]

When you say

[1] It's perhaps unclear why I call the index build a secondary index build.

did you mean a background index build, as opposed to a foreground secondary index build? I am afraid I have forgotten whether or not there is a distinction between foreground and background on secondaries.

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