[SERVER-30818] Wait for any running background index builds to finish before starting rollback Created: 24/Aug/17  Updated: 30/Oct/23  Resolved: 25/Jan/18

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

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: William Schultz (Inactive)
Resolution: Fixed Votes: 0
Labels: rollback-functional
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-11700 Docs for SERVER-30818: Wait for any r... Closed
Related
related to SERVER-45174 rollback should not abort single phas... Closed
related to SERVER-60819 remove jstests/replsets/rollback_wait... Closed
is related to SERVER-32844 Turn on recoverable rollback Javascri... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-10-02, Repl 2018-01-15, Repl 2018-01-29
Participants:
Linked BF Score: 14

 Description   

Writes for an initial index build aren't timestamped, so when we call recoverToStableTimestamp, the index data for any in-progress index builds won't be reverted so may contain references to records that no longer exist. Therefore we should wait for any running background index builds to complete before starting rollback, so that we won't try to call recoverToStableTimestamp in the middle of this index build.

SERVER-30911 will timestamp the catalog changes that represent the intent to build an index. After calling recoverToStableTimestamp, storage will build all ready: false indexes before returning.



 Comments   
Comment by Githook User [ 26/Jan/18 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-30818 Wait for all background index builds to complete before starting rollback to checkpoint

This reverts commit 0ebed531c6506e8538858758a6af5b8eb9da7ed2.
Branch: master
https://github.com/mongodb/mongo/commit/0d7bd8fac9de518710a6d34918fa12e6d63a2783

Comment by Githook User [ 25/Jan/18 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: Revert "SERVER-30818 Wait for all background index builds to complete before starting rollback to checkpoint"

This reverts commit 18eb990734653fc80f7d8c2916033e61ea7320e5.
Branch: master
https://github.com/mongodb/mongo/commit/0ebed531c6506e8538858758a6af5b8eb9da7ed2

Comment by Githook User [ 25/Jan/18 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-30818 Wait for all background index builds to complete before starting rollback to checkpoint
Branch: master
https://github.com/mongodb/mongo/commit/18eb990734653fc80f7d8c2916033e61ea7320e5

Comment by Githook User [ 17/Jan/18 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-30818 Cleanup comments in background.h
Branch: master
https://github.com/mongodb/mongo/commit/6f885ea4579c04bd73c4d6fecc497520105f2609

Comment by Githook User [ 17/Jan/18 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-30818 Add function to await background operations on multiple databases
Branch: master
https://github.com/mongodb/mongo/commit/aa35454e98a3026a7c44cc736d2326a3fa38e7b3

Comment by William Schultz (Inactive) [ 08/Jan/18 ]

The simple implementation approach is to just list all databases and call awaitNoBgOpInProgForDb() on each one, since there is no existing way to wait for all background ops to finish. This functionality can be added in background.cpp.

Comment by Spencer Brody (Inactive) [ 31/Aug/17 ]

There might also be a problem here with refetch based rollback as well. We need to investigate that.

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