Operational Defect Database

BugZero found this defect 45 days ago.

MongoDB | 2632261

Resharding coordinator should ensure participants have seen kAbort before dropping temp collection metadata

Last update date:

4/4/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

When the resharding coordinator aborts, it performs the following steps: 1. Transition the state document to kAbort. 2. Send the _shardsvrAbortReshardCollection to the participants 3. Proceed with cleaning up the resharding temporary collection metadata. However, by the time (3) executes there's no guarantee that shards will have seen the transition to kAbort (1). This is because (2) only clears the filtering metadata on the primary nodes (and issues a best effort async sharding metadata refresh which in turn will also asynchronously flush the ShardServerCatalogCacheLoader). This can be problematic in case of failover to a new secondary that is not yet aware of kAbort. One solution could be to make (2) perform this sharding metadata refresh + durably (majority) flush of the shardServerCatalogCacheLoader. Another solution, which is more in line with other callers of _updateCoordinatorDocStateAndCatalogEntries, would be to call {{ _tellAllDonorsToRefresh()}} (and _tellAllRecipientsToRefresh() too?) right after this line on the abort procedure.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...