[SERVER-51683] Await configRS optime replication before to stop it in lagged_config_secondary.js Created: 16/Oct/20  Updated: 29/Oct/23  Resolved: 22/Oct/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.7.0
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-42632 Disable pinger threads that reach out... Closed
is related to SERVER-51775 Failpoint to disable periodic uptime ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-10-19, Sharding 2020-11-02
Participants:
Linked BF Score: 22

 Description   

In order to perform this insertion the mongos will try to fetch the collection information from the config replica set, it will use nearest read preference and a majority read concern with the lastest opTime he is aware of. Obviously this insertion could fail if the request hit a secondary node of the config repl that is not able to satisfy the specified majority read concern.

The problem is that the test doesn't guarantees that the requested optime has been replicated to all secondaries when that insertion is executed, in fact between the awaitReplication and the stop of the replication on the config replica set, the opTime could be bumped on the mongos.

In particular in the test we saw that the uptime reporter on the mongos could ran in this time window (from awaitReplication to stopReplication) and cause the optime to bump.

The proposed solution is to move the awaitReplication just before the stopReplication call



 Comments   
Comment by Githook User [ 22/Oct/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-51683 Disable the uptime reporter thread in lagged_config_secondary.js
Branch: master
https://github.com/mongodb/mongo/commit/184e8acc583a9ee8fd9b928138c3b79bb9416cc2

Comment by Tommaso Tocci [ 19/Oct/20 ]

Reopening this because it occurred again after the first fix attempt

Comment by Githook User [ 16/Oct/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-51683 Await configRS optime replication before to stop it in lagged_config_secondary.js
Branch: master
https://github.com/mongodb/mongo/commit/77a42ecdd91ae10d2953d592b899e05d5aeca0a4

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