BugZero found this defect 45 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
4/4/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
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.