[SERVER-51510] Ensure that reshardingFields gets copied over from the enqueued to the persisted sharding metadata when combining CollAndChangedChunks structs Created: 13/Oct/20  Updated: 29/Oct/23  Resolved: 15/Oct/20

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

Type: Bug Priority: Major - P3
Reporter: Blake Oler Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: PM-234-M1, PM-234-T-lifecycle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-51209 Fill in missing gaps in Resharding wo... Closed
Related
related to SERVER-53140 Ensure that allowMigrations setting g... Closed
related to SERVER-51109 Add resharding fields to ShardCollect... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-10-19
Participants:

 Description   

Calling getChunksSince() on a shard enqueues metadata to be persisted to-disk after retrieving from the config server. The shard then re-fetches the shard's copy instead of preferring the config server's retrieved metadata.

It's important to know that this enqueuing process is asynchronous, so it's not guaranteed that the enqueued metadata will be immediately persisted. In order to account for this, retrieving the shard's metadata checks both the queue and the persisted data.

It's possible for the enqueued metadata to be half-applied while the persisted metadata was being read. In order to account for this, the retrieval logic replaces all of the overlapping chunks from persisted with the newer chunks from enqueued.

It's possible that the enqueued metadata has the collection entry's reshardingFields filled out, while the persisted metadata does not have reshardingFields. As a side-effect of the metadata overlap correction, reshardingFields will be lost.

This ticket is to simply copy/std::move reshardingFields from enqueued to persisted in this case.



 Comments   
Comment by Max Hirschhorn [ 01/Dec/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-51510 Ensure that reshardingFields gets copied over
from the enqueued to the persisted sharding metadata when combining
CollAndChangedChunks structs
Branch: master
https://github.com/mongodb/mongo/commit/c64fb000fa0931eab7482a5d775c7549280e61dc

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