[SERVER-16987] sh.getRecentMigrations shows aborted migration as success Created: 22/Jan/15  Updated: 25/Jan/17  Resolved: 13/Mar/15

Status: Closed
Project: Core Server
Component/s: Sharding, Shell
Affects Version/s: 2.8.0-rc5
Fix Version/s: 3.0.3, 3.1.0

Type: Bug Priority: Major - P3
Reporter: Asya Kamsky Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Participants:

 Description   

sh.status was showing a successful migration when there weren't any and I tried it down to this function sh.getRecentMigrations() reporting this as success:

db.changelog.aggregate( [         { $match : { time : { $gt : yesterday }, what : "moveChunk.from", "details.errmsg" : {             "$exists" : false } } }]).toArray()
[
	{
		"_id" : "tugc2.mongodb.com-2015-01-22T01:20:49-54c050716fa2c02a2608c1f5",
		"server" : "tugc2.mongodb.com",
		"clientAddr" : "50.23.195.163:56685",
		"time" : ISODate("2015-01-22T01:20:49.565Z"),
		"what" : "moveChunk.from",
		"ns" : "ycsb.usertable",
		"details" : {
			"min" : {
				"_id" : { "$minKey" : 1 }
			},
			"max" : {
				"_id" : NumberLong("-3074457345618258602")
			},
			"step 1 of 6" : 0,
			"step 2 of 6" : 31,
			"step 3 of 6" : 4,
			"to" : "ycsbTest1",
			"from" : "ycsbTest2",
			"note" : "aborted"
		}
	}
]

Clearly aborted != success. For inexplicable reasons it's looking for "errmsg" in "moveChunk.from" - rather than "details.note":"aborted" or something in the new actionlog?



 Comments   
Comment by Githook User [ 20/Apr/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-16987 sh.getRecentMigrations shows aborted migration as success

Add more comments

(cherry picked from commit 7f73e3e38f9b606574a2b7599e0b0f491b962587)
Branch: v3.0
https://github.com/mongodb/mongo/commit/d12a68e550e4f928b8c8f9d052062b4072b236ef

Comment by Githook User [ 20/Apr/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-16987 sh.getRecentMigrations shows aborted migration as success

(cherry picked from commit 40502abaac233ed0b27a9bf9612bd4df61811a68)
Branch: v3.0
https://github.com/mongodb/mongo/commit/6920a654e8bc81b602a39bb96216ba44ad7da53f

Comment by Githook User [ 13/Mar/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-16987 sh.getRecentMigrations shows aborted migration as success

Add more comments
Branch: master
https://github.com/mongodb/mongo/commit/7f73e3e38f9b606574a2b7599e0b0f491b962587

Comment by Githook User [ 13/Mar/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-16987 sh.getRecentMigrations shows aborted migration as success
Branch: master
https://github.com/mongodb/mongo/commit/40502abaac233ed0b27a9bf9612bd4df61811a68

Comment by Asya Kamsky [ 04/Mar/15 ]

This helper function aggregation should check for "details.note":"aborted" as well as errmsg. Clearly presence of details.note that says "aborted" indicates migration was not successful.

Comment by Asya Kamsky [ 09/Feb/15 ]

I don't have the config DBs anymore.

Just turn off balancer, and use manual splits and migrates - try a bunch of them very fast, I'm guessing the failure is due to previous migration still not being finished?

Comment by David Hows [ 22/Jan/15 ]

Can you dump your conifg db and attach it? Oh yeah, and what caused the error in the migration? The errmsg should be set every time there is a problem and if its not being set, that should be fixed.

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