[SERVER-7394] 'movePrimary' should issue a warning if data exists in the database being moved Created: 17/Oct/12  Updated: 13/Aug/13  Resolved: 11/Mar/13

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

Type: Bug Priority: Major - P3
Reporter: William Zola Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-8870 mongos unaware of database move after... Closed
Operating System: ALL
Participants:

 Description   

This is an extension to SERVER-3562. That fix caused the 'movePrimary' command to not move any collection data for sharded collections. Because 'movePrimary' (or 'clone') does not take out a write lock, it is possible for users to try to write to that collection while the clone is in-flight. If they do so before the metadata is updated, the writes can be lost.

The long-term fix would be to lock all of the collections being moved by 'clone'. As a short-term fix, I'd suggest having 'movePrimary' return a warning if it detects any unsharded collections in the database being moved.



 Comments   
Comment by Remon van Vliet [ 13/Aug/13 ]

Is there an open issue for the long term fix suggested here?

Comment by Scott Hernandez (Inactive) [ 11/Mar/13 ]

"movePrimary" needs to move unsharded collections (with data) in the source database/shard to a new shard. Your request directly contradicts the purpose of the "movePrimary" command.

Generated at Thu Feb 08 03:14:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.