[SERVER-55763] ClearReshardingFilteringMetadata unittest constructs a POS but does not set all required fields the resharding recipient state document Created: 02/Apr/21  Updated: 29/Oct/23  Resolved: 02/Apr/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.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
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-04-05
Participants:
Linked BF Score: 64
Story Points: 1

 Description   

The ClearReshardingFilteringMetadata extends from the ReshardingDonorRecipientCommonTest fixture which registers the resharding PrimaryOnlyServices.

The test creates this recipient document, which lacks a FetchTimestamp field. If rebuilding the primary only service reads this state document (when rebuilding on stepup), we'll hit this invariant for lacking a fetchTimestamp.

We can hit this failure if the two conditions are met:

  • The unittest runs before RecipientStateMachine onStepUp is run. (such that it would see the bad document).
  • The RecipientStateMachine onStepUp method is run prior to the unittest completion which triggers POS::onShutDown (which would cause the onStepUp to cooperatively early-exit prior to hitting the invariant).


 Comments   
Comment by Githook User [ 02/Apr/21 ]

Author:

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

Message: SERVER-55763: Correct ClearReshardingFilteringMetadata and clarify its test fixture APIs.
Branch: master
https://github.com/mongodb/mongo/commit/2baf588b0fa92699c4f63bee9e910889bafdbad9

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