[SERVER-40316] Wait for index build to complete in secondary_reads_timestamp_visibility.js Created: 22/Mar/19  Updated: 29/Oct/23  Resolved: 01/Apr/19

Status: Closed
Project: Core Server
Component/s: Replication, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.1.10

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2019-04-08
Participants:
Linked BF Score: 11

 Description   

We cannot expect the lastApplied to move forward (because of the failpoint), so if the completion of the index build moves the minVisibleSnapshot ahead of it, we will block while trying to read from the secondary. We need to ensure that the build completes before we activate the failpoint.



 Comments   
Comment by Githook User [ 01/Apr/19 ]

Author:

{'email': 'vesselina.ratcheva@10gen.com', 'name': 'Vesselina Ratcheva', 'username': 'vessy-mongodb'}

Message: SERVER-40316 Wait for index build to complete in secondary_reads_timestamp_visibility.js
Branch: master
https://github.com/mongodb/mongo/commit/75fa5cc276248362c0d6337a54ff38a0bac0b59b

Comment by Louis Williams [ 29/Mar/19 ]

FYI, we should be able to call waitForAllIndexBuildsToFinish() where we call awaitReplication().

Comment by Vesselina Ratcheva (Inactive) [ 27/Mar/19 ]

To clarify, we specifically want the secondary to have finished building the index. We otherwise risk having the index build finish after the failpoint has been hit, which is undesirable as that would move the minimum visible snapshot ahead of the last applied. We can't read ahead of the lastApplied and behind the minimum visible snapshot, so in this case we block on the PBWM to conflict with batch application (see here). However. the PBWM is held while the failpoint is activated, so there's no way to acquire it.

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