[SERVER-1842] Handle migrate back case when previous migrate clean-up hasn't finished Created: 23/Sep/10  Updated: 12/Jul/16  Resolved: 22/Jan/11

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

Type: Bug Priority: Major - P3
Reporter: Alberto Lerner Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File auto2-Nightly_Linux_V8_64bit.txt    
Operating System: ALL
Participants:

 Description   

Currently, the clean up after a chunk migration waits for all cursors to be done before wiping out data.

Here's a triggering sequence of events:

shard0: has open cursor on chunk [low1.. high1]
shard0: moves chunk [low1..high1] to shard1
shard0: clean up after chunk moved delayed by open cursor
...
shard1: move chunk [low2..high2] to shard0, where [low2..high2] intercepts [low1..high1]
shard0: close cursor on chunk [low1..high1] while [low2...high2] is migrating
shard0: cleaning thread for [low1..high1] might touch [low2..high2]

An example situation is show in auto2.js logging attached (although the last step didn't happen there)



 Comments   
Comment by auto [ 22/Jan/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: don't allow a shard to be the TO of a migrate while its still cleaning up old data SERVER-1842
https://github.com/mongodb/mongo/commit/84e7e2ce17c1d5a48c1cf8f468a6ce4c0d558097

Generated at Thu Feb 08 02:58:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.